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


C# Export.ShowDialog方法代码示例

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


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

示例1: ExportDataToolStripMenuItem_Click

		private void ExportDataToolStripMenuItem_Click(object sender, EventArgs e)
		{
			Connect connect = new Connect();
			if (connect.ShowDialog() == DialogResult.OK)
			{
				ElasticSearchClient descClient = new ElasticSearchClient(connect.Host, connect.Port, connect.Type);

				Export export = new Export();
				if (export.ShowDialog() == DialogResult.OK)
				{
					var toIndex = export.IndexName;
					var limit = export.LimitSize;
					var buffer = export.BufferSize;
					var bulkSize = export.BulkSize;
					var complicatedSource = export.ComplicatedSource;
					var resolveTenant = export.ResolveTenant;
					var showLog = export.ShowLog;
				    var skipCount = export.SkipCount;

					foreach (var selectedNode in treeViewAdv1.SelectedNodes)
					{
						var elasticNode = ((ElasticNode)(selectedNode.Tag));
						var index = elasticNode.IndexName;
						WriteLog("Export for: {0}", selectedNode.Tag);

						int bufferSize = buffer;
						int limitSize = limit;
						new Thread(new ThreadStart(delegate()
													{
                                                        try
                                                        {

                                                            var start = DateTime.Now;
                                                            var total = elasticNode.ElasticSearchInstance.Count(index,
                                                                                                                "*");
                                                            if (limitSize > total) limitSize = total;
                                                            if (bufferSize > limitSize) bufferSize = limitSize;
                                                            WriteLog(
                                                                "Transform Index : {0} To Index : {1},{2} Pending Docs",
                                                                index, toIndex, limitSize);

                                                            for (int i = skipCount; i < limitSize; i += bufferSize)
                                                            {
                                                                IndexTransfer(index, toIndex, i, bufferSize, bulkSize,
                                                                              elasticNode.ElasticSearchInstance,
                                                                              descClient, complicatedSource,
                                                                              resolveTenant, showLog);
                                                            }


                                                            WriteLog(
                                                                "Index : {0} Transform Finished,Time Elapsed : {1}",
                                                                index,
                                                                DateTime.Now - start);
                                                        }catch(Exception ex)
                                                        {
                                                            //todo
                                                        }

													})).Start();

					}
				}
			}

		}
开发者ID:daniellm,项目名称:ElasticSearch.Net,代码行数:66,代码来源:Form1.cs

示例2: Button1_Click

        private void Button1_Click(object sender, EventArgs e)
        {
            Export ExportDialog = new Export();

            if (ExportDialog.ShowDialog() == DialogResult.OK)
            {
                ReadData();
            }
        }
开发者ID:NovelBird,项目名称:Contact-Manager,代码行数:9,代码来源:ContactManager.cs

示例3: ExportData

        public void ExportData()
        {
            Config config = this.GetConfig();

            Export export = new Export();
            export.width.Maximum = this.heightData.Width;
            export.width.Value = this.heightData.Width;
            export.height.Maximum = this.heightData.Height;
            export.height.Value = this.heightData.Height;
            if (config.exportRescaleMode) export.subzeroMode2.Checked = true;

            if (export.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                if (this.FileDialog(this.exportHeightmapDialog, ref config.lastExportedFile))
                {
                    string path = this.exportHeightmapDialog.FileName;
                    string ext = path.Substring(path.LastIndexOf('.'), path.Length - path.LastIndexOf('.')).ToLower();

                    //config.lastExportedFile = path;

                    config.exportRescaleMode = export.subzeroMode2.Checked;

                    HeightData toExport = Main.GetResizedHeightData(this.heightData, (int)export.width.Value, (int)export.height.Value);

                    // rescale the values if necessary
                    if (ext != ".shd" && export.subzeroMode2.Checked) Main.ScaleHeightValues(ref toExport, 0, short.MaxValue - 1);

                    if (ext == ".shd")
                    {
                        System.IO.BinaryWriter writer = new System.IO.BinaryWriter(System.IO.File.Open(path, System.IO.FileMode.OpenOrCreate, System.IO.FileAccess.Write));
                        writer.Write(toExport.Width);
                        writer.Write(toExport.Height);

                        for (int i = 0; i < toExport.Length; i++ )
                        {
                            writer.Write(toExport[i]);
                        }

                        writer.Close();
                    }
                    else
                    {
                        Main.HeightDataToBitmap(toExport).Save(path);
                    }

                    toExport.Dispose();
                }                               
            }
        }
开发者ID:hamstah,项目名称:geogen,代码行数:49,代码来源:OutputManager.cs

示例4: ExportDialog

        public ExportResult ExportDialog(string strDocName, out string strProjectDir, out bool fExportProject)
        {
            strProjectDir = "";
            fExportProject = false;

            Export ex = new Export(strDocName);
            DialogResult result = ex.ShowDialog();
            if (result == DialogResult.Cancel)
                return ExportResult.Cancel;
            if (result != DialogResult.OK)
                return ExportResult.Failed;

            strProjectDir = ex.ExportLocation;
            fExportProject = ex.Project || ex.UpdateProject;
            bool fSkipGameState = ex.UpdateProject;

            bool fNDS = Options.Platform == Options.PlatformType.NDS;
            if (Export(strProjectDir, fExportProject, fNDS, fSkipGameState))
                return ExportResult.OK;

            return ExportResult.Failed;
        }
开发者ID:jduranmaster,项目名称:spritely,代码行数:22,代码来源:FileHandler_Export.cs

示例5: ExportToolStripMenuItem_DropDownItemClicked

 /// <summary>
 /// Handles the DropDownItemClicked event of the ExportToolStripMenuItem control.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param>
 private void ExportToolStripMenuItem_DropDownItemClicked(object sender, EventArgs e)
 {
     // Run through each of the tabs to make sure they get resized to the current window size, otherwise the preview BMPs will not be a consistent size
     if (!tabControl1.Contains(tabPage1) && tabControl1.TabCount > 1)
     {
         int i = tabControl1.SelectedIndex;
         tabControl1.SelectedIndex = (tabControl1.SelectedIndex + 1) % tabControl1.TabCount;
         while (i != tabControl1.SelectedIndex){
             tabControl1.SelectedIndex = (tabControl1.SelectedIndex + 1) % tabControl1.TabCount;
         }
     }
     Export exportDialog = new Export(shapes, tessellations, tabControl1.SelectedIndex);
     exportDialog.ShowDialog();
 }
开发者ID:jrpavoncello,项目名称:OrbitMapper,代码行数:19,代码来源:MainForms.cs

示例6: button5_Click

 private void button5_Click(object sender, EventArgs e)
 {
     this.Hide();
     Export Import = new Export(Export);
     Import.ShowDialog();
 }
开发者ID:andreidana,项目名称:NETOld,代码行数:6,代码来源:Select.cs

示例7: btnExportMSG_Click

        internal void btnExportMSG_Click(object sender, EventArgs e)
        {
            Export exporter = new Export(GetProductsDS());
            exporter.ShowDialog(this);

            var remove = exporter.ResultDelItems;
            if (remove != ResultRemoving.None)
            {
                RemoveMSG(remove);
            }
        }
开发者ID:mkoscak,项目名称:active-mizu,代码行数:11,代码来源:MainWindow.cs


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