示例#1
0
        public override void Close()
        {
            try
            {
                Studio.Instance.Project.ExportOptions.Namespace  = _exportOptionsWidget._textNamespace.Text;
                Studio.Instance.Project.ExportOptions.OutputPath = _exportOptionsWidget._textOutputPath.Text;
                Studio.Instance.Project.ExportOptions.Class      = _exportOptionsWidget._textClassName.Text;
                Studio.Instance.IsDirty = true;

                var export = new ExporterCS(Studio.Instance.Project);

                var strings = new List <string>();
                strings.Add("Success. Following files had been written:");
                strings.AddRange(export.Export());

                var dlg = CreateMessageBox("Export To C#", string.Join("\n", strings));
                dlg.ShowModal(Desktop);
            }
            catch (Exception ex)
            {
                var msg = CreateMessageBox("Error", ex.Message);
                msg.ShowModal(Desktop);
            }

            base.Close();
        }
示例#2
0
        private void ButtonOkOnDown(object sender, EventArgs eventArgs)
        {
            try
            {
                Studio.Instance.Project.ExportOptions.Namespace  = _exportOptionsWidget._textNamespace.Text;
                Studio.Instance.Project.ExportOptions.OutputPath = _exportOptionsWidget._textOutputPath.Text;
                Studio.Instance.Project.ExportOptions.Class      = _exportOptionsWidget._textClassName.Text;
                Studio.Instance.IsDirty = true;

                var export = new ExporterCS(Studio.Instance.Project);

                var strings = new List <string>();
                strings.Add("Success. Following files had been written:");
                strings.AddRange(export.Export());

                var dlg = CreateMessageBox("Export To C#", string.Join("\n", strings));
                dlg.ShowModal(Desktop);
            }
            catch (Exception ex)
            {
                _logger.Error(ex);
                var msg = CreateMessageBox("Error", ex.Message);
                msg.ShowModal(Desktop);
            }
        }