static void Main(string[] args) { ProcessStartInfo cmdProcess = new ProcessStartInfo(); cmdProcess.WindowStyle = ProcessWindowStyle.Hidden; cmdProcess.CreateNoWindow = true; cmdProcess.FileName = "cmd"; cmdProcess.Arguments = "/c msiexec /x "; //Product ID cmdProcess.Arguments += "{731962DB-76B1-XXE8-XXA7-3XX57C9F6EXX}"; Process pro = new Process(); pro.StartInfo = cmdProcess; pro.Start(); }


 

 

[이미지 1] CMD Help

'.Net > C#' 카테고리의 다른 글

C# Keys 열거형  (0) 2013.07.11
C# 4.0 선택적 매개변수, 명명된 매개변수  (0) 2013.01.10
유니코드표  (0) 2012.09.24
C# Excel 범위로 데이터들 가져오기  (0) 2012.08.30
C# Serialize, Deserialize  (0) 2012.08.21
0 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
ㅜ[
  

 

 

유니코드 = (44032+ 초성)* (588+ 중성) * (28+종성);

 

 

 

유니코드표.txt

Array values = (System.Array)workSheet.get_Range("B2", "Z2").Value2; 

'.Net > C#' 카테고리의 다른 글

C# CMD 창 띄우지 않고 명령어 실행하기  (0) 2012.12.26
유니코드표  (0) 2012.09.24
C# Serialize, Deserialize  (0) 2012.08.21
C# DoubleBuffering (더블 버퍼링)  (0) 2012.08.07
C# UserControl->UserControl 네이버 지식인 답변  (0) 2012.07.17
    /// <summary>
    /// Serialize할 유형입니다.
    /// </summary>
    public enum SerializeType
    {
        /// <summary>
        /// BinaryFormatter
        /// </summary>
        BinaryFormatter,
        /// <summary>
        /// SoapFormatter
        /// </summary>
        SoapFormatter
    }

    /// <summary>
    /// Serialize와 Deserialize를 편리하게 이용하는 Static Class
    /// </summary>
    public static class Serialization
    {
        /// <summary>
        /// 직렬화합니다.
        /// </summary>
        /// <param name="serializeType">Serialize 유형</param>
        /// <param name="filePath">Write할 파일경로</param>
        /// <param name="graph">그래프의 루트에 있는 serialize할 개체입니다.</param>
        public static void Serialize(SerializeType serializeType, string filePath, object graph)
        {
            try
            {
                switch (serializeType)
                {
                    case SerializeType.BinaryFormatter: BinaryFormatterSerialize(filePath, graph); break;
                    case SerializeType.SoapFormatter: SoapFormatterSerialize(filePath, graph); break;
                }
            }
            catch (Exception e)
            {
                throw e;
            }
        }

        /// <summary>
        /// 역직렬화합니다.
        /// </summary>
        /// <param name="serializeType">Serialize 유형</param>
        /// <param name="filePath">Read할 파일경로</param>
        /// <param name="graph">그래프의 루트에 있는 Deserialize할 개체입니다.</param>
        public static object Deserialize(SerializeType serializeType, string filePath, object graph)
        {
            try
            {
                switch (serializeType)
                {
                    case SerializeType.BinaryFormatter: return BinaryFormatterDeserialize(filePath, graph); 
                    case SerializeType.SoapFormatter: return SoapFormatterDeserialize(filePath, graph); 
                }
                throw new NotSupportedException("지원하지 않는 형식입니다.");
            }
            catch (Exception e)
            {
                throw e;
            }
        }
        /// <summary>
        /// BinaryFormatter를 이용해 Serialize합니다.
        /// </summary>
        /// <param name="filePath"></param>
        /// <param name="graph"></param>
        private static object BinaryFormatterDeserialize(string filePath, object graph)
        {
            FileStream fs = null;
            try
            {
                fs = new FileStream(filePath, FileMode.Open, FileAccess.Read);
                BinaryFormatter bf = new BinaryFormatter();
                object obj = bf.Deserialize(fs);
                fs.Close();
                return obj;
            }
            catch (Exception e)
            {
                throw e;
            }
            finally
            {
                
                if (fs != null)
                    fs.Close();
            }
        }


        /// <summary>
        /// SoapFormatter를 이용해 Serialize합니다.
        /// </summary>
        /// <param name="filePath"></param>
        /// <param name="graph"></param>
        private static object SoapFormatterDeserialize(string filePath, object graph)
        {
            FileStream fs = null;
            try
            {
                fs = new FileStream(filePath, FileMode.Open, FileAccess.Read);
                SoapFormatter sf = new SoapFormatter();
                object obj = sf.Deserialize(fs);
                fs.Close();
                return obj;
            }
            catch (Exception e)
            {
                throw e;
            }
            finally
            {
                if (fs != null)
                    fs.Close();
            }
        }


        /// <summary>
        /// BinaryFormatter를 이용해 Serialize합니다.
        /// </summary>
        /// <param name="filePath"></param>
        /// <param name="graph"></param>
        private static void BinaryFormatterSerialize(string filePath, object graph)
        {
            FileStream fs = null;
            try
            {
                fs = new FileStream(filePath, FileMode.Create, FileAccess.Write);
                BinaryFormatter bf = new BinaryFormatter();
                bf.Serialize(fs, graph);
                fs.Close();
            }
            catch (Exception e)
            {
                throw e;
            }
            finally
            {
                if (fs != null)
                    fs.Close();
            }
        }


        /// <summary>
        /// SoapFormatter를 이용해 Serialize합니다.
        /// </summary>
        /// <param name="filePath"></param>
        /// <param name="graph"></param>
        private static void SoapFormatterSerialize(string filePath, object graph)
        {
            FileStream fs = null;
            try
            {
                fs = new FileStream(filePath, FileMode.Create, FileAccess.Write);
                SoapFormatter sf = new SoapFormatter();
                sf.Serialize(fs, graph);
                fs.Close();
            }
            catch(Exception e)
            {
                throw e;
            }
            finally
            {
                if (fs != null)
                    fs.Close();
            }
        }
       
    }

'.Net > C#' 카테고리의 다른 글

유니코드표  (0) 2012.09.24
C# Excel 범위로 데이터들 가져오기  (0) 2012.08.30
C# DoubleBuffering (더블 버퍼링)  (0) 2012.08.07
C# UserControl->UserControl 네이버 지식인 답변  (0) 2012.07.17
C# Thread Test Project  (0) 2012.07.11
    class DoubleBufferingPanel:Panel
    {
        public DoubleBufferingPanel()
        {
            SetStyle(ControlStyles.AllPaintingInWmPaint, true);
            SetStyle(ControlStyles.UserPaint, true);
            SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
        }
    }

'.Net > C#' 카테고리의 다른 글

C# Excel 범위로 데이터들 가져오기  (0) 2012.08.30
C# Serialize, Deserialize  (0) 2012.08.21
C# UserControl->UserControl 네이버 지식인 답변  (0) 2012.07.17
C# Thread Test Project  (0) 2012.07.11
C# Resources에서 이미지 가져오기  (0) 2012.07.09

질문

 

 

 

그림을 잘 파악하셔서 방법을 좀 알려주세요!!!!

단순 winform 에서 usercontrol 사용법은 파악했는데, usercontrol 내에서 usercontrol로 이동하는

방법은 찾아바도 잘 나오지 않아 못하고 있습니다.

 

단순 winform 에서는 판넬을 하나 올려서

panel.controls.add(usercontrol1); 하고 다른 usercontrol로 옮길땐

panel.controls.remove(usercontrol1);

panel.controls.add(usercontrol2); 하면 되는것 까진 알고 있습니다.

 

위 사항을 잘 보시고 알려주세요!!!!! 

 

 

 

답변

 

namespace AboutUserControl
{
    public partial class FormMain : Form
    {
        public FormMain()
        {
            InitializeComponent();
            TestUserControl();
        }

        private void TestUserControl()
        {
            //UserControl1 Panel 컨트롤에 추가
            UserControl1 userControl1 = new UserControl1();
            this.panel.Controls.Add(userControl1);
            //

            //UserControl2 컨트롤을 추가하는 메서드 호출
            userControl1.AddUserControl2();
        }        
    }
}


 

 

namespace AboutUserControl
{
    public partial class UserControl1 : UserControl
    {
        public UserControl1()
        {
            InitializeComponent();
        }

        /// <summary>
        /// UserControl2를 생성하는 메서드
        /// </summary>
        internal void AddUserControl2()
        {
            UserControl2 userControl2 = new UserControl2();
            this.panel.Controls.Add(userControl2);
        }
    }
}


 

AboutUserControl.zip


 

'.Net > C#' 카테고리의 다른 글

C# Serialize, Deserialize  (0) 2012.08.21
C# DoubleBuffering (더블 버퍼링)  (0) 2012.08.07
C# Thread Test Project  (0) 2012.07.11
C# Resources에서 이미지 가져오기  (0) 2012.07.09
C# Image->Bitmap->Icon  (1) 2012.07.04

아래의 항목 사용 예제

1. BackgroundWorker

2. 비동기 Delegate

3. Thread

4. ThreadPool

 

AboutThread.zip

'.Net > C#' 카테고리의 다른 글

C# Serialize, Deserialize  (0) 2012.08.21
C# DoubleBuffering (더블 버퍼링)  (0) 2012.08.07
C# UserControl->UserControl 네이버 지식인 답변  (0) 2012.07.17
C# Resources에서 이미지 가져오기  (0) 2012.07.09
C# Image->Bitmap->Icon  (1) 2012.07.04
  1 Stream stream = this.GetType().Assembly.GetManifestResourceStream("WindowsApplication1.filename.jpg");
  2 Bitmap bmp = new Bitmap(stream);

출처 : Microsoft 고객지원

'.Net > C#' 카테고리의 다른 글

C# Serialize, Deserialize  (0) 2012.08.21
C# DoubleBuffering (더블 버퍼링)  (0) 2012.08.07
C# UserControl->UserControl 네이버 지식인 답변  (0) 2012.07.17
C# Thread Test Project  (0) 2012.07.11
C# Image->Bitmap->Icon  (1) 2012.07.04
  1 Image helpImage = RWAS.Properties.Resources.help;
  2 Bitmap helpBitmap = new Bitmap(helpImage);
  3 formHelp.Icon = Icon.FromHandle(helpBitmap.GetHicon());

 

'.Net > C#' 카테고리의 다른 글

C# Serialize, Deserialize  (0) 2012.08.21
C# DoubleBuffering (더블 버퍼링)  (0) 2012.08.07
C# UserControl->UserControl 네이버 지식인 답변  (0) 2012.07.17
C# Thread Test Project  (0) 2012.07.11
C# Resources에서 이미지 가져오기  (0) 2012.07.09

+ Recent posts