当前位置: 首页>>代码示例>>C#>>正文


C# Connection.ShowDialog方法代码示例

本文整理汇总了C#中Connection.ShowDialog方法的典型用法代码示例。如果您正苦于以下问题:C# Connection.ShowDialog方法的具体用法?C# Connection.ShowDialog怎么用?C# Connection.ShowDialog使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Connection的用法示例。


在下文中一共展示了Connection.ShowDialog方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: managementGroupToolStripMenuItem_Click

        private void managementGroupToolStripMenuItem_Click(object sender, EventArgs e)
        {
            m_managementPack.Clear();
            Connection Connection = new Connection();
            Connection.ShowDialog();
            if (Connection.DialogResult != DialogResult.OK)
            {
                return;
            }
            this.ManagementGroup = Connection.Server;
            try
            {
                if (Connection.User != "")
                {
                    ManagementGroupConnectionSettings emgs = new ManagementGroupConnectionSettings(Connection.Server);
                    string[] user = Connection.User.Split('\\');
                    emgs.Domain = user[0];
                    emgs.UserName = user[1];
                    SecureString password = new SecureString();
                    foreach (char c in Connection.Password)
                    {
                        password.AppendChar(c);
                    }
                    emgs.Password = password;
                    emg = new ManagementGroup(emgs);

                }
                else
                {
                    emg = new ManagementGroup(Connection.Server);
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
                return;
            }

            BackgroundWorker MGConnector = new BackgroundWorker();

            MGConnector.DoWork += MGConnector_DoWork;
            MGConnector.RunWorkerCompleted += MGConnector_RunWorkerCompleted;
            m_progressDialog = new ProgressDialog();
            MGConnector.RunWorkerAsync(MPLoadingProgress);

            m_progressDialog.ShowDialog();
            MultipleMPSelectionForm form = new MultipleMPSelectionForm(MPList);
            DialogResult r = form.ShowDialog();
            if (r != DialogResult.Cancel && form.ChosenMP.Count > 0)
            {
                foreach (ManagementPack item in form.ChosenMP)
                {
                    this.m_managementPack.Add(item.Name, item);
                }
                Mode = MPMode.ManagementGroup;
                ProcessManagementPacks();
            }
        }
开发者ID:JanVanMeirvenne,项目名称:mpviewer,代码行数:58,代码来源:MPViewer.cs

示例2: SetFtpSettings

 private void SetFtpSettings()
 {
     Connection cnForm = new Connection();
     if (cnForm.ShowDialog() == System.Windows.Forms.DialogResult.OK)
     {
         this._ftpServerIp = cnForm.ServerIp;
         this._ftpServerPort = cnForm.Port;
         this._user = cnForm.UserLogin;
         this._password = cnForm.UserPassword;
     }
 }
开发者ID:Dr1N,项目名称:FtpClient,代码行数:11,代码来源:MyFtpMain.cs

示例3: FECipherVit_Load

 private void FECipherVit_Load(object sender, EventArgs e)
 {
     File.Delete("decktemp");
     Player = new User();
     Rival = new User();
     msgProcessor = new MsgProcessor(this);
     string[] CardDataTemp = File.ReadAllLines("CardData.fe0db", Encoding.UTF8);
     CardData = new List<string[]>();
     foreach (string carddatumtemp in CardDataTemp)
     {
         string[] temp = carddatumtemp.Split(new char[] { ',' }, StringSplitOptions.None);
         CardData.Add(temp);
     }
     CardData.Sort(delegate (string[] x, string[] y)
     {
         return Convert.ToInt32(x[0]) - Convert.ToInt32(y[0]);
     });
     try
     {
         pictureBoxCardInfo.Image = Image.FromFile(@"img/back.jpg");
     }
     catch
     {
         pictureBoxCardInfo.Image = pictureBoxCardInfo.ErrorImage;
     }
     ConnectionRenew();
     connection = new Connection(this);
     connection.ShowDialog();
     ContextMenuStripRenew();
     UpdateThread = new Thread(new ThreadStart(CheckUpdate));
     UpdateThread.Start();
 }
开发者ID:jacksonstarry,项目名称:FECipherVit,代码行数:32,代码来源:FECipherVit.cs

示例4: FECipherVit_Load

 private void FECipherVit_Load(object sender, EventArgs e)
 {
     if (SpeVer.Contains("Compi"))
     {
         DisablePlaying();
     }
     if (SpeVer.Contains("Judge"))
     {
         开启裁判功能ToolStripMenuItem.Visible = true;
     }
     File.Delete("decktemp");
     Player = new User(this);
     Rival = new User(this);
     msgProcessor = new MsgProcessor(this);
     report = res.GetString("report_string1", Thread.CurrentThread.CurrentUICulture) + DateTime.Now.ToString();
     try
     {
         string[] CardDataTemp;
         if (Language == Language.Chinese)
         {
             CardDataTemp = File.ReadAllLines("CardData.fe0db", Encoding.UTF8);
         }
         else
         {
             CardDataTemp = File.ReadAllLines("CardData_En.fe0db", Encoding.UTF8);
         }
         CardData = new Dictionary<string, string[]>();
         foreach (string carddatumtemp in CardDataTemp)
         {
             if (carddatumtemp.Contains("USO"))
             {
                 continue;
             }
             string[] temp = carddatumtemp.Split(new char[] { ',' }, StringSplitOptions.None);
             if (Language == Language.English && temp.Length >= 19)
             {
                 temp[4] = temp[4].Replace("%%", ",");
                 temp[16] = temp[16].Replace("%%", ",");
                 temp[17] = temp[17].Replace("%%", ",");
             }
             CardData.Add(temp[0], temp);
             if (temp.Length >= 19 && temp[18] == "2")
             {
                 string[] temp2 = (string[])temp.Clone();
                 temp2[0] += "+";
                 temp2[2] += "+";
                 CardData.Add(temp2[0], temp2);
             }
         }
         DatabaseVer = int.Parse(CardData["0"][2]);
         try
         {
             pictureBoxCardInfo.Image = Image.FromFile(@"img/back.jpg");
         }
         catch
         {
             pictureBoxCardInfo.Image = pictureBoxCardInfo.ErrorImage;
         }
     }
     catch
     {
         MessageBox.Show(res.GetString("LoadCardData_string1", Thread.CurrentThread.CurrentUICulture), res.GetString("LoadCardData_caption", Thread.CurrentThread.CurrentUICulture));
         Application.Exit();
     }
     if (Language == Language.Chinese)
     {
         UpdateGetMsgTextBox("欢迎使用FECipherVit。\r\n程序版本号:" + Version.ToString() + " " + SpeVer + "\r\n数据库版本号:" + DatabaseVer.ToString());
     }
     else
     {
         UpdateGetMsgTextBox("Welcome to FECipherVit.\r\nVersion: " + Version.ToString() + " " + SpeVer + "\r\nDatabase version: " + DatabaseVer.ToString());
     }
     ConnectionRenew();
     connection = new Connection(this);
     connection.ShowDialog();
     historychecker = new HistoryChecker(this);
     ContextMenuStripRenew();
     CreateThumbnailsThread = new Thread(new ThreadStart(CheckCardImgs));
     CreateThumbnailsThread.Start();
 }
开发者ID:sdercolin,项目名称:FECipherVit,代码行数:80,代码来源:FECipherVit.cs


注:本文中的Connection.ShowDialog方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。