블로그 이미지
Magic_kit
study 관련자료를 한곳으로 자기 개발 목적으로 재태크 재무 관리 목적으로 일상생활의 팁을 공유 하기 위하여 블로그를 개설 하였습니다.

calendar

1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31

Category

Recent Post

Recent Comment

Archive

2009. 11. 3. 11:07 .Net Project/ASP.NET 3.5 Sp1
반응형
 FrmFreeTextBox.aspx




<%@ Page Language="C#" AutoEventWireup="true"
          CodeFile="FrmFreeTextBox.aspx.cs" Inherits="FrmFreeTextBox" %>

<%@ Register Assembly="FreeTextBox" Namespace="FreeTextBoxControls" TagPrefix="FTB" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <FTB:FreeTextBox ID="FreeTextBox1" runat="server">
        </FTB:FreeTextBox>
        <asp:Button ID="Button1" runat="server" Text="Button" onclick="Button1_Click" />
        <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
   
    </div>
    </form>
</body>
</html>


 FrmFreeTextBox.aspx.Cs

 using System;

public partial class FrmFreeTextBox : System.Web.UI.Page
{
    protected void Button1_Click(object sender, EventArgs e)
    {
        Label1.Text = FreeTextBox1.Text;
    }
}





반응형
posted by Magic_kit
2009. 11. 3. 11:03 .Net Project/ASP.NET 3.5 Sp1
반응형
 FrmAjaxEditor.aspx

 



<%@ Page Language="C#" AutoEventWireup="true"
          CodeFile="FrmAjaxEditor.aspx.cs" Inherits="FrmAjaxEditor" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit.HTMLEditor"
    TagPrefix="cc1" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:ScriptManager ID="ScriptManager1" runat="server" >
        </asp:ScriptManager>
       
    ACT에서 제공하는 Editor 사용
        <cc1:Editor ID="Editor1" runat="server" Width="500px" Height="400px" />
        <asp:Button ID="btnWrite" runat="server" Text="저장 또는 미리보기"
            onclick="btnWrite_Click" />
        <asp:Label ID="lblDisplay" runat="server" Text="" ForeColor="Red"></asp:Label>
    </div>
    </form>
</body>
</html>


 FrmAjaxEditor.aspx.Cs

 using System;

public partial class FrmAjaxEditor : System.Web.UI.Page
{
     protected void btnWrite_Click(object sender, EventArgs e)
    {
        //HTML 에디터의 값을 출력 : HTML 타입으로
        //DB 저장시에도 Content 속성 사용하면 됨
        this.lblDisplay.Text = Editor1.Content;
    }
}





반응형
posted by Magic_kit
2009. 11. 2. 14:36 .Net Project/ASP.NET 3.5 Sp1
반응형
 ImageDown.Cs




using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Drawing;
using System.IO;

/// <summary>
/// ImageDown : 완성형(DotNetNote) 게시판의 이미지전용다운 페이지
/// 이미지 경로를 보여주지 않고 다운로드한다.
/// </summary>
public partial class DotNetNote_ImageDown : System.Web.UI.Page
{
  #region Event Handlers
  protected void Page_Load(object sender, System.EventArgs e)
  {
    string strFileName = Request.Params["FileName"].ToString();
    string strFileExt = Path.GetExtension(strFileName);
    string strContentType = "";
    if (strFileExt == ".gif" || strFileExt == ".jpg"
     || strFileExt == ".jpeg" || strFileExt == ".png")
    {
      switch (strFileExt)
      {
        case ".gif":
          strContentType = "image/gif"; break;
        case ".jpg":
          strContentType = "image/jpeg"; break;
        case ".jpeg":
          strContentType = "image/jpeg"; break;
        case ".png":
          strContentType = "image/png"; break;
      }
    }
    else
    {
      Response.Write(
        "<script language='javascript'>"
        + "alert('이미지 파일이 아닙니다.')</script>");
      Response.End();
    }
    string strFilePath =
      Server.MapPath("./MyFiles/") + strFileName;

    Response.Clear();
    Response.ContentType = strContentType;
    Response.WriteFile(strFilePath);
    Response.End();
  }
  #endregion
}




축소판 이미지 제작.Cs

 using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Drawing;
using System.IO;

/// <summary>
/// ThumbNail : 축소판 이미지 생성기
/// </summary>
public partial class DotNetNote_ThumbNail : System.Web.UI.Page
{
  #region Event Handlers
  protected void Page_Load(object sender, System.EventArgs e)
  {
    //변수 초기화
    int boxWidth = 100;
    int boxHeight = 100;
    double scale = 0;

    //파일 이름을 설정
    string strFileName = String.Empty;
    string strSelectedFile = String.Empty;

    if (Request["FileName"] != null)
    {
      strSelectedFile = Request.QueryString["FileName"];
    }
    else
    {
      strSelectedFile = "./mybook.jpg";//기본 이미지로 초기화
    }
    strFileName =
    Server.MapPath("./MyFiles/" + strSelectedFile);

    int tmpW = Convert.ToInt32(Request.QueryString["Width"]);
    int tmpH = Convert.ToInt32(Request.QueryString["Height"]);

    if (tmpW > 0 && tmpH > 0)
    {
      boxWidth = tmpW;
      boxHeight = tmpH;
    }

    //새 이미지 생성
    Bitmap b = new Bitmap(strFileName);

    //크기 비율을 계산한다.
    if (b.Height < b.Width)
    {
      scale = ((double)boxHeight) / b.Width;
    }
    else
    {
      scale = ((double)boxWidth) / b.Height;
    }

    //새 너비와 높이를 설정한다.
    int newWidth = (int)(scale * b.Width);
    int newHeight = (int)(scale * b.Height);

    //출력 비트맵을 생성, 출력한다.
    Bitmap bOut = new Bitmap(b, newWidth, newHeight);
    bOut.Save(Response.OutputStream, b.RawFormat);

    //마무리
    b.Dispose();
    bOut.Dispose();
  }
  #endregion
}







반응형
posted by Magic_kit
2009. 11. 2. 14:34 .Net Project/ASP.NET 3.5 Sp1
반응형
 Reply.aspx

 


<!-- BoardReply.aspx -->

<%@ Page Language="C#" AutoEventWireup="true"
  CodeFile="BoardReply.aspx.cs"
  Inherits="DotNetNote_BoardReply" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
  <title>글 답변</title>
  <link href="../DotNetNote/DotNetNote.css"
    rel="stylesheet" type="text/css" />
</head>
<body>
  <form id="form1" runat="server">
    <div>
      <h3>완성형 게시판</h3>
      <font style="font-size: 9pt; color: #ff0000">
        글&nbsp;답변 - 다음 필드들을 채워주세요. </font>
      <hr width="100%" size="1" />
      <table id="Table1" style="border-collapse: collapse"
        bordercolor="black" cellspacing="0"
        rules="none" width="600" align="center"
        bgcolor="white">
        <tr>
          <td align="right" width="100"
            bgcolor="#efefef">
            *이 &nbsp;름
          </td>
          <td width="500">
            <asp:TextBox ID="txtName" runat="server"
              Width="150px" MaxLength="10"
              BorderStyle="Solid" BorderWidth="1px"></asp:TextBox>
            <font face="굴림">&nbsp;
              <asp:RequiredFieldValidator ID="valName"
                runat="server" Display="None"
                ControlToValidate="txtName"
                ErrorMessage="* 이름을 작성해 주세요."
                SetFocusOnError="True">
              </asp:RequiredFieldValidator></font>
          </td>
        </tr>
        <tr>
          <td align="right" bgcolor="#efefef">
            E-mail
          </td>
          <td>
            <asp:TextBox ID="txtEmail" runat="server"
              Width="200px" MaxLength="80"
              BorderStyle="Solid" BorderWidth="1px"></asp:TextBox>
            <font style="font-size: 9pt" color="#aaaaaa">
              <i>(Optional)</i> </font>
            <asp:RegularExpressionValidator
              ID="valEmail" runat="server"
              Display="None" ControlToValidate="txtEmail"
              ErrorMessage="* 메일형식이 올바르지 않습니다"
              ValidationExpression=
                "\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"
              SetFocusOnError="True">
            </asp:RegularExpressionValidator>
          </td>
        </tr>
        <tr>
          <td align="right" bgcolor="#efefef">
            Homepage
          </td>
          <td>
            <asp:TextBox ID="txtHomepage" runat="server"
              Width="300px" MaxLength="80"
              BorderStyle="Solid" BorderWidth="1px"></asp:TextBox>
              <font style="font-size: 9pt" color="#aaaaaa">
                <i>(Optional)</i>
              </font>
            <asp:RegularExpressionValidator
              ID="valHomepage" runat="server"
              Display="None" ControlToValidate="txtHomepage"
              ErrorMessage="* 홈페이지를 정확히 작성해주세요."
              ValidationExpression="
              http://([\w-]+\.)+[\w-]+(/[\w- ./?%&amp;=]*)?"
              SetFocusOnError="True">
            </asp:RegularExpressionValidator>
          </td>
        </tr>
        <tr>
          <td align="right" bgcolor="#efefef"
            style="height: 22px">
            *제 &nbsp;목
          </td>
          <td style="height: 22px">
            <asp:TextBox ID="txtTitle" runat="server"
              Width="480px" MaxLength="30"
              BorderStyle="Solid" BorderWidth="1px"></asp:TextBox>
              <font face="굴림">&nbsp;</font>
            <asp:RequiredFieldValidator ID="valTitle"
              runat="server" Display="None"
              ControlToValidate="txtTitle"
              ErrorMessage="* 제목을 기입해 주세요"
              SetFocusOnError="True"></asp:RequiredFieldValidator>
          </td>
        </tr>
        <tr>
          <td align="right" bgcolor="#efefef">
            *내 &nbsp;용
          </td>
          <td>
            <asp:TextBox ID="txtContent" runat="server"
              Width="480px" BorderStyle="Solid"
              BorderWidth="1px" Rows="10" TextMode="MultiLine">
            </asp:TextBox><br />
            <asp:RequiredFieldValidator ID="valContent"
              runat="server" Display="None"
              ControlToValidate="txtContent"
              ErrorMessage="* 내용을 기입해 주세요"
              SetFocusOnError="True">
            </asp:RequiredFieldValidator>
          </td>
        </tr>
        <tr>
          <td align="right" bgcolor="#efefef">
            파일첨부
          </td>
          <td>
            <asp:CheckBox ID="chkUpload" runat="server"
              AutoPostBack="True"
              Text="이 체크박스를 선택하면 업로드 화면이 나타납니다."
              OnCheckedChanged="chkUpload_CheckedChanged">
            </asp:CheckBox><br />
            <asp:Panel ID="Panel1" runat="server"
              Width="240px" Height="21px" Visible="False">
              <input id="txtFileName" style="width: 290px;
                height: 19px" type="file" size="29"
                name="File1" runat="server">
            </asp:Panel>
          </td>
        </tr>
        <tr>
          <td align="right" bgcolor="#efefef">
            *인코딩
          </td>
          <td>
            <font face="굴림">
              <asp:RadioButtonList ID="rdoEncoding"
                runat="server" RepeatDirection="Horizontal">
                <asp:ListItem Value="Text" Selected="True">Text</asp:ListItem>
                <asp:ListItem Value="HTML">HTML</asp:ListItem>
                <asp:ListItem Value="Mixed">Mixed</asp:ListItem>
              </asp:RadioButtonList></font></td>
        </tr>
        <tr>
          <td align="right" bgcolor="#efefef">
            *비밀번호
          </td>
          <td>
            <asp:TextBox ID="txtPassword" runat="server"
              Width="150px" MaxLength="20"
              BorderStyle="Solid" BorderWidth="1px"
              TextMode="Password" EnableViewState="False">
            </asp:TextBox>&nbsp;
            <asp:RequiredFieldValidator ID="valPassword"
              runat="server" Display="None"
              ControlToValidate="txtPassword"
              ErrorMessage="* 비밀번호를 기입해 주세요"
              SetFocusOnError="True"></asp:RequiredFieldValidator>
          </td>
        </tr>
      </table>
      <p align="center">
        <asp:Button ID="btnWrite" runat="server"
          Width="80px" BorderStyle="Groove"
          BorderWidth="1px" Text="저장" BorderColor="#404040"
          OnClick="btnWrite_Click"></asp:Button><font
            face="굴림">&nbsp;</font><font face="굴림">&nbsp;</font>
        <asp:Button ID="btnList" runat="server"
          Width="80px" BorderStyle="Groove"
          BorderWidth="1px" Text="리스트"
          BorderColor="#404040" CausesValidation="False"
          OnClick="btnList_Click"></asp:Button></p>
      <p align="center">
        <asp:ValidationSummary ID="ValidationSummary1"
          runat="server" DisplayMode="List"
          ShowMessageBox="True" ShowSummary="False">
        </asp:ValidationSummary>
        <br />
        <asp:Label ID="txtNum" runat="server"
          Visible="False"></asp:Label>
        <asp:Label ID="txtRef" runat="server"
          Visible="False"></asp:Label>
        <asp:Label ID="txtStep" runat="server"
          Visible="False"></asp:Label>
        <asp:Label ID="txtRefOrder" runat="server"
          Visible="False"></asp:Label></p>
    </div>
  </form>
</body>
</html>


 Reply.aspx.Cs

 using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;
using System.IO;

/// <summary>
/// BoardReply : 완성형(DotNetNote) 게시판의 답변 페이지
/// </summary>
public partial class DotNetNote_BoardReply : System.Web.UI.Page
{
  #region Private Member Variables
  private string strNum = "";//글 번호
  private string strBaseDir = null;//파일 업로드 폴더
  private string strFileName = null;//파일명
  private int intFileSize = 0;//파일 사이즈
  #endregion

  #region Event Handlers
  //페이지 로드될 때 부모글 데이터로 초기화
  protected void Page_Load(object sender, System.EventArgs e)
  {
    strNum = Request.QueryString["Num"].ToString();
    if (this.IsPostBack != true)
    {
      SqlConnection objCon = new SqlConnection();
      objCon.ConnectionString =
        ConfigurationManager.ConnectionStrings[
          "ConnectionString"].ConnectionString;
      objCon.Open();

      SqlCommand objCmd = new SqlCommand();
      objCmd.Connection = objCon;
      objCmd.CommandText =
        "Select * From DotNetNote Where Num = " + strNum;
      objCmd.CommandType = CommandType.Text;
      SqlDataReader objDr = objCmd.ExecuteReader();
      if (objDr.Read())
      {
        txtTitle.Text = "Re : " + objDr["Title"].ToString();

        string strTempContent = "\n\nOn "
          + objDr["PostDate"].ToString() + ", '"
          + objDr["Name"] + "' wrote:\n";
        strTempContent += "----------";
        strTempContent += "\n>"
          + objDr["Content"].ToString().Replace("\n", "\n>");
        strTempContent += "\n----------";
        txtContent.Text = strTempContent;
        ViewState["Ref"] = objDr["Ref"].ToString();
        ViewState["Step"] = objDr["Step"].ToString();
        ViewState["RefOrder"] = objDr["RefOrder"].ToString();
        txtNum.Text = objDr["Num"].ToString();
        txtRef.Text = objDr["Ref"].ToString();
        txtStep.Text = objDr["Step"].ToString();
        txtRefOrder.Text = objDr["RefOrder"].ToString();
      }
      objDr.Close();
      objCon.Close();
    }
  }

  //리스트 이동 버튼 링크
  protected void btnList_Click(object sender, System.EventArgs e)
  {
    Response.Redirect("BoardList.aspx");
  }

  //글 답변 처리
  protected void btnWrite_Click(object sender, System.EventArgs e)
  {
    int varRef = Convert.ToInt32(txtRef.Text);
    int varStep = int.Parse(txtStep.Text);
    int varRefOrder = int.Parse(txtRefOrder.Text);

    SqlConnection objCon = new SqlConnection();
    objCon.ConnectionString = ConfigurationManager.ConnectionStrings[
      "ConnectionString"].ConnectionString;
    objCon.Open();

    string strName = txtName.Text.Replace("&", "&amp;").Replace(
      "<", "&lt;").Replace(">", "&gt;");
    string strTitle = txtTitle.Text.Replace("&", "&amp;").Replace(
      "<", "&lt;").Replace(">", "&gt;");

    //파일 업로드 처리 시작
    strBaseDir = Server.MapPath("./MyFiles");
    strFileName = "";
    intFileSize = 0;
    if (txtFileName.PostedFile != null)
    {
      if (txtFileName.PostedFile.FileName.Trim().Length > 0 &&
        txtFileName.PostedFile.ContentLength > 0)
      {
        strFileName = // 파일명 중복처리
          GetFilePath(strBaseDir,
            Path.GetFileName(txtFileName.PostedFile.FileName));
        intFileSize = txtFileName.PostedFile.ContentLength;
        //업로드 처리 : SaveAs()
        txtFileName.PostedFile.SaveAs(
          Path.Combine(strBaseDir, strFileName));
      }
    }//파일 업로드 처리 끝

    SqlCommand objCmd = new SqlCommand();
    objCmd.Connection = objCon;

    // 부모글의 답변 수 1 증가
    objCmd.CommandText =
      "Update DotNetNote Set AnswerNum = AnswerNum + 1 "
      + " Where Num = " + txtNum.Text;//
    objCmd.CommandType = CommandType.Text;
    objCmd.ExecuteNonQuery();

    // 같은 글에 대해서 답변을 두 번 이상하면 먼저 답변한 게 위에 나타나게 한다.
    string strSql =
      "SELECT RefOrder, AnswerNum FROM DotNetNote WHERE ParentNum = "
      + txtNum.Text + " AND RefOrder = (SELECT MAX(RefOrder) FROM "
      + " DotNetNote WHERE ParentNum = " + txtNum.Text + ")";
    objCmd.CommandText = strSql;
    objCmd.CommandType = CommandType.Text;
    SqlDataReader objDr = objCmd.ExecuteReader();

    // 만약 위 조건에 해당하는 답변이 없다면(처음 답변일 때) :
    // 어떤 부모글(상위글)에 대한 첫번재 답변이면...
    int MaxRefOrder;
    int MaxRefAnswerNum;
    if (objDr.Read())
    {
      MaxRefOrder = Convert.ToInt32(objDr[0].ToString());
      MaxRefAnswerNum = Convert.ToInt32(objDr[1].ToString());
    }
    else
    {
      MaxRefOrder = varRefOrder;
      MaxRefAnswerNum = 0;
    }
    objDr.Close();

    // RefOrder 값을 1증가시킨다. :
    // 비집고 들어갈 자리에 해당하는 RefOrder 값을 모두 1증가...
    strSql = "UPDATE DotNetNote SET RefOrder = RefOrder + 1 "
      + " WHERE Ref = " + varRef + " AND RefOrder > "
      + (MaxRefOrder + MaxRefAnswerNum);
    objCmd.CommandText = strSql;
    objCmd.CommandType = CommandType.Text;
    objCmd.ExecuteNonQuery();

    objCmd.CommandText = "ReplyDotNetNote";

    objCmd.Parameters.Add("@Name", SqlDbType.VarChar, 25);
    objCmd.Parameters.Add("@Email", SqlDbType.VarChar, 100);
    objCmd.Parameters.Add("@Title", SqlDbType.VarChar, 150);
    objCmd.Parameters.Add("@PostIP", SqlDbType.VarChar, 15);
    objCmd.Parameters.Add("@Content", SqlDbType.Text);
    objCmd.Parameters.Add("@Password", SqlDbType.VarChar, 20);
    objCmd.Parameters.Add("@Encoding", SqlDbType.VarChar, 10);
    objCmd.Parameters.Add("@Homepage", SqlDbType.VarChar, 100);
    objCmd.Parameters.Add("@Ref", SqlDbType.Int);// 참조글 번호
    objCmd.Parameters.Add("@Step", SqlDbType.Int);// 들여쓰기
    objCmd.Parameters.Add("@RefOrder", SqlDbType.Int);// 답글 순서
    objCmd.Parameters.Add("@ParentNum", SqlDbType.Int);
    objCmd.Parameters.Add("@FileName", SqlDbType.VarChar, 255);
    objCmd.Parameters.Add("@FileSize", SqlDbType.Int);

    objCmd.Parameters["@Name"].Value = txtName.Text;
    objCmd.Parameters["@Email"].Value = txtEmail.Text;
    objCmd.Parameters["@Title"].Value = txtTitle.Text;
    objCmd.Parameters["@PostIP"].Value = Request.UserHostAddress;
    objCmd.Parameters["@Content"].Value = txtContent.Text;
    objCmd.Parameters["@Password"].Value = txtPassword.Text;
    objCmd.Parameters["@Encoding"].Value =
      rdoEncoding.SelectedItem.Text;
    objCmd.Parameters["@Homepage"].Value = txtHomepage.Text;
    objCmd.Parameters["@Ref"].Value = //답변글은 부모글의 Ref를 적용
      Convert.ToInt32(txtRef.Text.ToString());
    objCmd.Parameters["@Step"].Value = varStep + 1;
    objCmd.Parameters["@RefOrder"].Value =
      (MaxRefOrder + MaxRefAnswerNum) + 1;
    objCmd.Parameters["@ParentNum"].Value =
      Convert.ToInt32(txtNum.Text.ToString());
    objCmd.Parameters["@FileName"].Value = strFileName;
    objCmd.Parameters["@FileSize"].Value = intFileSize;

    objCmd.CommandType = CommandType.StoredProcedure;
    objCmd.ExecuteNonQuery();

    objCon.Close();
    Response.Redirect("./BoardList.aspx");
  }

  //파일 첨부 레이어 보이기/감추기
  protected void chkUpload_CheckedChanged(
    object sender, System.EventArgs e)
  {
    if (chkUpload.Checked)
    {
      Panel1.Visible = true;
    }
    else
    {
      Panel1.Visible = false;
    }
  }
  #endregion

  #region Public Methods
  #region 파일명 뒤에 번호 붙이는 메서드
  /// <summary>
  /// GetFilePath : 파일명 뒤에 번호 붙이는 메서드
  /// </summary>
  /// <param name="strBaseDirTemp">경로(c:\MyFiles)</param>
  /// <param name="strFileNameTemp">Test.txt</param>
  /// <returns>Test(1).txt</returns>
  private string GetFilePath(
    string strBaseDirTemp, string strFileNameTemp)
  {
    string strName = //순수파일명 : Test
      Path.GetFileNameWithoutExtension(strFileNameTemp);
    string strExt =  //확장자 : .txt
      Path.GetExtension(strFileNameTemp);
    bool blnExists = true;
    int i = 0;
    while (blnExists)
    {
      if (File.Exists(
        Path.Combine(strBaseDirTemp, strFileNameTemp)))
      {//Path.Combine(경로, 파일명) = 경로+파일명
        i++;
        strFileNameTemp =
          strName + "(" + i + ")" + strExt;//Test(3).txt
      }
      else
      {
        blnExists = false;
      }
    }
    return strFileNameTemp;
  }
  #endregion
  #endregion
}






반응형
posted by Magic_kit
prev 1 2 3 4 5 6 7 8 ··· 30 next