示例#1
0
 public MainWindow()
 {
     InitializeComponent();
     canvasSize = CanvasSize.GetCanvasSize;
     InitializeCanvas();
     sqlitehelper    = SQLiteHelper.GetSqlHelper;
     menu            = Menu.GetMenu;
     rtbhelper       = new RTextboxHelper();
     logoSynProvider = new CommonSyntaxProvider(LogoKeywords.GetLogoKeywords().GetKeywords, LogoKeywords.GetLogoKeywords().GetSpecialCharacters, false);
     synHighligt     = new SyntaxHighlight(commandLine, logoSynProvider);
 }
示例#2
0
 public MainWindow()
 {
     InitializeComponent();
     canvasSize = CanvasSize.GetCanvasSize;
     InitializeCanvas();
     sqlitehelper = SQLiteHelper.GetSqlHelper;
     menu = Menu.GetMenu;
     rtbhelper = new RTextboxHelper();
     logoSynProvider = new CommonSyntaxProvider(LogoKeywords.GetLogoKeywords().GetKeywords, LogoKeywords.GetLogoKeywords().GetSpecialCharacters, false);
     synHighligt = new SyntaxHighlight(commandLine, logoSynProvider);
 }
示例#3
0
        private void SelectButton_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                int height = int.Parse(txtcanvasHeight.Text);
                int width  = int.Parse(txtcanvasWidth.Text);
                if (nameText.Text == String.Empty)
                {
                    throw new Exception(App.Current.TryFindResource("nameempty").ToString());
                }
                if (projectText.Text == String.Empty)
                {
                    throw new Exception(App.Current.TryFindResource("projectempty").ToString());
                }
                SQLiteHelper sqlitehelp = SQLiteHelper.GetSqlHelper;
                string       lang;
                if (languageCombo.Text == "Magyar" || languageCombo.Text == "Hungarian")
                {
                    lang = "langhu";
                }
                else
                {
                    lang = "langen";
                }
                sqlitehelp.NewFile(sfd.FileName, height, width, nameText.Text, projectText.Text, lang);
                CanvasSize canvasSize = CanvasSize.GetCanvasSize;

                canvasSize.Width  = width;
                canvasSize.Height = height;

                this.Close();
            }
            catch (Exception ex)
            {
                MessageBox.Show(App.Current.TryFindResource("error").ToString() + ": \n" + ex.Message);
            }
        }