Exemplo n.º 1
0
        private void HandleEdit()
        {
            if (CurrentOptions.IsReady() == false)
            {
                MessageBox.Show("Make sure all options are ready", MsgTitle);
            }
            else
            {
                UpdateOptionsData();
                string str = Html.Text;

                if (Support.IsHtmlAllowed(CurrentOptions, CurrentOptions.BootstrapProjectPath, str) == false)
                {
                    if (CurrentOptions.IsTraceOn(Trace_Options.TraceWarning) == true)
                    {
                        Trace.TraceWarning("Html is not allowed with editing Html Source");
                    }
                }
                else if (MessageBox.Show("Do you wish allow editing of Html source?", MsgTitle, MessageBoxButton.YesNo) == MessageBoxResult.Yes)
                {
                    IsBootstrapHtml = Support.IsBootstrapHtml;
                    CurrentOptions.AllowHtmlEditing = true;
                    Html.IsEnabled      = true;
                    IndexPage.IsEnabled = true;

                    if (MessageBox.Show("Do you wish to use Page as reference?", MsgTitle, MessageBoxButton.YesNo) == MessageBoxResult.Yes)
                    {
                        str       = str.Replace("Test", CurrentOptions.PageName);
                        Html.Text = str;
                    }
                }
            }
        }
Exemplo n.º 2
0
        private void HandleLoad()
        {
            string str = Support.GetProjectDirectory("Bootstrap HTML Project");

            if (string.IsNullOrEmpty(str) == true)
            {
                // user hit cancel do nothing
            }
            else if (Support.IsHtmlAllowed(CurrentOptions, str, CurrentOptions.BootstrapHtml) == false)
            {
                if (CurrentOptions.IsTraceOn(Trace_Options.TraceWarning) == true)
                {
                    Trace.TraceWarning("Html is not allowed when loading new  Html Source");
                }
            }
            else
            {
                IsBootstrapHtml = Support.IsBootstrapHtml;
                CurrentOptions.BootstrapProjectPath = str;
                CurrentOptions.PageName             = "Test";
                UpdateScreen();
            }
        }