示例#1
0
 /// <summary>
 /// Shows the application help file</summary>
 /// <param name="helpNavigator">Help navigator</param>
 /// <param name="keyword">Keyword in help file</param>
 public void ShowHelp(System.Windows.Forms.HelpNavigator helpNavigator, string keyword)
 {
     if (keyword == null)
     {
         ShowHelp(helpNavigator);
     }
     else if (HelpFilePath != null)
     {
         System.Windows.Forms.Help.ShowHelp(null, HelpFilePath, helpNavigator, keyword);
     }
 }
        private void Info_Click(object sender, RoutedEventArgs e)
        {
            StreamReader file  = new StreamReader("UserLogin.txt");
            string       login = file.ReadLine();

            file.Close();
            if (login == null)
            {
                System.Windows.Forms.HelpNavigator navigator = System.Windows.Forms.HelpNavigator.Topic;
                System.Windows.Forms.Help.ShowHelp(null, "help.chm", navigator, "statistika_2.htm");
            }
            else
            {
                System.Windows.Forms.HelpNavigator navigator = System.Windows.Forms.HelpNavigator.Topic;
                System.Windows.Forms.Help.ShowHelp(null, "help.chm", navigator, "statistika_1.htm");
            }
        }
示例#3
0
        private static void Show(int topicId, System.Windows.Forms.HelpNavigator navigator)
        {
            string helpPath = Path.Combine(
                Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location),
                @"..\..\..\..\Help\WwiseHelp_en.chm");

            if (File.Exists(helpPath))
            {
                if (topicId != 0)
                {
                    navigator = System.Windows.Forms.HelpNavigator.TopicId;
                }

                System.Windows.Forms.Help.ShowHelp(null, helpPath, navigator, topicId != 0 ? topicId.ToString() : "");
            }
            else
            {
                MessageBox.Show(string.Format(Properties.Resources.CantFindHelpFile, helpPath));
            }
        }
        private void Info_Click(object sender, RoutedEventArgs e)
        {
            StreamReader file  = new StreamReader("UserLogin.txt");
            string       login = file.ReadLine();

            file.Close();
            if (login == null)
            {
                Mainmenu mainmenu = new Mainmenu();
                mainmenu.Show();
                this.Close();
                System.Windows.Forms.HelpNavigator navigator = System.Windows.Forms.HelpNavigator.Topic;
                System.Windows.Forms.Help.ShowHelp(null, "help.chm", navigator, "vyvod_informatsii_ob_avtozapchastyakh_2.htm");
            }
            else
            {
                MainMenuUser mainMenuUser = new MainMenuUser();
                mainMenuUser.Show();
                this.Close();
                System.Windows.Forms.HelpNavigator navigator = System.Windows.Forms.HelpNavigator.Topic;
                System.Windows.Forms.Help.ShowHelp(null, "help.chm", navigator, "vyvod_informatsii_ob_avtozapchastyakh_1.htm");
            }
        }
 private void Info_Click(object sender, RoutedEventArgs e)
 {
     System.Windows.Forms.HelpNavigator navigator = System.Windows.Forms.HelpNavigator.Topic;
     System.Windows.Forms.Help.ShowHelp(null, "help.chm", navigator, "obnovlenie_dannykh_avtozapchastej.htm");
 }
示例#6
0
        /// <summary>
        /// Generates a single method call to display an InfoBox.
        /// </summary>
        /// <param name="behavior">The behavior.</param>
        /// <param name="text">The text.</param>
        /// <param name="title">The title.</param>
        /// <param name="buttons">The buttons.</param>
        /// <param name="button1Text">The button1 text.</param>
        /// <param name="button2Text">The button2 text.</param>
        /// <param name="icon">The icon.</param>
        /// <param name="iconFileName">Name of the icon file.</param>
        /// <param name="defaultButton">The default button.</param>
        /// <param name="buttonsLayout">The buttons layout.</param>
        /// <param name="autoSize">The autosize parameters</param>
        /// <param name="position">The position.</param>
        /// <param name="showHelp">if set to <c>true</c> [show help].</param>
        /// <param name="helpFile">The help file.</param>
        /// <param name="helpTopic">The help topic.</param>
        /// <param name="navigator">The navigator.</param>
        /// <param name="checkState">The state of the checkbox.</param>
        /// <param name="style">The style.</param>
        /// <param name="useAutoClose">if set to <c>true</c> [use auto close].</param>
        /// <param name="autoClose">The auto-close parameters.</param>
        /// <param name="design">The design.</param>
        /// <param name="titleStyle">The title style.</param>
        /// <param name="titleIconFileName">Filename of the title icon .</param>
        /// <param name="opacity">The opacity.</param>
        /// <param name="order">The order.</param>
        /// <returns></returns>
        public string GenerateSingleCall(InformationBoxBehavior behavior, string text, string title, InformationBoxButtons buttons, string button1Text, string button2Text, InformationBoxIcon icon, string iconFileName, InformationBoxDefaultButton defaultButton, InformationBoxButtonsLayout buttonsLayout, InformationBoxAutoSizeMode autoSize, InformationBoxPosition position, bool showHelp, string helpFile, string helpTopic, System.Windows.Forms.HelpNavigator navigator, InformationBoxCheckBox checkState, InformationBoxStyle style, bool useAutoClose, AutoCloseParameters autoClose, DesignParameters design, InformationBoxTitleIconStyle titleStyle, string titleIconFileName, InformationBoxOpacity opacity, InformationBoxOrder order)
        {
            StringBuilder codeBuilder = new StringBuilder();

            if (checkState == 0)
            {
                codeBuilder.AppendFormat("InformationBox.Show(\"{0}\", ", text.Replace(Environment.NewLine, "\\n"));
            }
            else
            {
                codeBuilder.Append("Dim doNotShowState as CheckState = CheckState.Indeterminate");
                codeBuilder.Append(Environment.NewLine);
                codeBuilder.AppendFormat("InformationBox.Show(\"{0}\", doNotShowState, ", text.Replace(Environment.NewLine, "\\n"));
            }

            if (!String.IsNullOrEmpty(helpFile) || !String.IsNullOrEmpty(title))
            {
                codeBuilder.AppendFormat("\"{0}\", ", title);
            }

            if (buttons != InformationBoxButtons.OK)
            {
                codeBuilder.AppendFormat("InformationBoxButtons.{0}, ", buttons);
            }

            if (buttons == InformationBoxButtons.OKCancelUser1 ||
                buttons == InformationBoxButtons.User1User2 ||
                buttons == InformationBoxButtons.YesNoUser1)
            {
                codeBuilder.AppendFormat("New String() {{ \"{0}\", \"{1}\" }}, ", button1Text, button2Text);
            }

            if (icon != InformationBoxIcon.None)
            {
                codeBuilder.AppendFormat("InformationBoxIcon.{0}, ", icon);
            }

            if (!String.IsNullOrEmpty(iconFileName))
            {
                codeBuilder.AppendFormat("New System.Drawing.Icon(@\"{0}\"), ", iconFileName);
            }

            if (defaultButton != InformationBoxDefaultButton.Button1)
            {
                codeBuilder.AppendFormat("InformationBoxDefaultButton.{0}, ", defaultButton);
            }

            if (buttonsLayout != InformationBoxButtonsLayout.GroupMiddle)
            {
                codeBuilder.AppendFormat("InformationBoxButtonsLayout.{0}, ", buttonsLayout);
            }

            if (autoSize != InformationBoxAutoSizeMode.None)
            {
                codeBuilder.AppendFormat("InformationBoxAutoSizeMode.{0}, ", autoSize);
            }

            if (position != InformationBoxPosition.CenterOnParent)
            {
                codeBuilder.AppendFormat("InformationBoxPosition.{0}, ", position);
            }

            if (showHelp)
            {
                codeBuilder.Append("True, ");
            }

            if (!String.IsNullOrEmpty(helpFile))
            {
                codeBuilder.AppendFormat("\"{0}\", ", helpFile);
            }

            if (navigator != 0)
            {
                codeBuilder.AppendFormat("HelpNavigator.{0}, ", navigator);
            }

            if (!String.IsNullOrEmpty(helpTopic))
            {
                codeBuilder.AppendFormat("\"{0}\", ", helpTopic);
            }

            if (checkState != 0)
            {
                codeBuilder.Append("InformationBoxCheckBox.Show");
                if ((checkState & InformationBoxCheckBox.Checked) == InformationBoxCheckBox.Checked)
                {
                    codeBuilder.Append(" Or InformationBoxCheckBox.Checked");
                }

                if ((checkState & InformationBoxCheckBox.RightAligned) == InformationBoxCheckBox.RightAligned)
                {
                    codeBuilder.Append(" Or InformationBoxCheckBox.RightAligned");
                }

                codeBuilder.Append(", ");
            }

            if (style != InformationBoxStyle.Standard)
            {
                codeBuilder.AppendFormat("InformationBoxStyle.{0}, ", style);
            }

            if (order != InformationBoxOrder.Default)
            {
                codeBuilder.AppendFormat("InformationBoxOrder.{0}, ", order);
            }

            if (useAutoClose)
            {
                if (autoClose.Seconds == AutoCloseParameters.Default.Seconds &&
                    autoClose.DefaultButton == InformationBoxDefaultButton.Button1 &&
                    autoClose.Result == InformationBoxResult.None)
                {
                    codeBuilder.Append("AutoCloseParameters.Default, ");
                }
                else
                {
                    if (autoClose.Mode == AutoCloseDefinedParameters.Button)
                    {
                        codeBuilder.AppendFormat("New AutoCloseParameters({0}, InformationBoxDefaultButton.{1}), ", autoClose.Seconds, autoClose.DefaultButton);
                    }
                    else if (autoClose.Mode == AutoCloseDefinedParameters.Result)
                    {
                        codeBuilder.AppendFormat("New AutoCloseParameters({0}, InformationBoxResult.{1}), ", autoClose.Seconds, autoClose.Result);
                    }
                    else
                    {
                        codeBuilder.AppendFormat("New AutoCloseParameters({0}), ", autoClose.Seconds);
                    }
                }
            }

            if (null != design)
            {
                codeBuilder.AppendFormat(CultureInfo.InvariantCulture, "New DesignParameters(Color.FromArgb({0},{1},{2}), Color.FromArgb({3},{4},{5})), ", design.FormBackColor.R, design.FormBackColor.G, design.FormBackColor.B, design.BarsBackColor.R, design.BarsBackColor.G, design.BarsBackColor.B);
            }

            if (titleStyle == InformationBoxTitleIconStyle.Custom)
            {
                codeBuilder.AppendFormat(CultureInfo.InvariantCulture, "New InformationBoxTitleIcon(@\"{0}\"), ", titleIconFileName);
            }
            else if (titleStyle == InformationBoxTitleIconStyle.SameAsBox)
            {
                codeBuilder.Append("InformationBoxTitleIconStyle.SameAsBox, ");
            }

            if (behavior == InformationBoxBehavior.Modeless)
            {
                codeBuilder.Append("InformationBoxBehavior.Modeless, ");
            }

            if (opacity != InformationBoxOpacity.NoFade)
            {
                codeBuilder.AppendFormat("InformationBoxOpacity.{0}, ", opacity);
            }

            codeBuilder[codeBuilder.Length - 2] = ')';

            return(codeBuilder.ToString().Replace("\"\"", "String.Empty"));
        }
示例#7
0
 private void Info_Click(object sender, RoutedEventArgs e)
 {
     System.Windows.Forms.HelpNavigator navigator = System.Windows.Forms.HelpNavigator.Topic;
     System.Windows.Forms.Help.ShowHelp(null, "help.chm", navigator, "nachalnoe_okno_administratora.htm");
 }
示例#8
0
 /// <summary>
 /// Shows the application help file</summary>
 /// <param name="helpNavigator">Help navigator</param>
 public void ShowHelp(System.Windows.Forms.HelpNavigator helpNavigator)
 {
     System.Windows.Forms.Help.ShowHelp(null, HelpFilePath, helpNavigator);
 }
 private void Info_Click(object sender, RoutedEventArgs e)
 {
     System.Windows.Forms.HelpNavigator navigator = System.Windows.Forms.HelpNavigator.Topic;
     System.Windows.Forms.Help.ShowHelp(null, "help.chm", navigator, "redaktirovanie_dannykh_akkaunta.htm");
 }
示例#10
0
 private void Info_Click(object sender, RoutedEventArgs e)
 {
     System.Windows.Forms.HelpNavigator navigator = System.Windows.Forms.HelpNavigator.Topic;
     System.Windows.Forms.Help.ShowHelp(null, "help.chm", navigator, "oformlenie_zakaza.htm");
 }
示例#11
0
 /// <summary>
 /// Shows the specified help.
 /// </summary>
 /// <param name="navigator">The navigator.
 /// Example:
 ///  - System.Windows.Forms.HelpNavigator.Find
 ///  - System.Windows.Forms.HelpNavigator.Index</param>
 public static void Show(System.Windows.Forms.HelpNavigator navigator)
 {
     Show(0, navigator);
 }
示例#12
0
 public static System.Windows.Forms.DialogResult Show(string text, string caption, System.Windows.Forms.MessageBoxButtons buttons, System.Windows.Forms.MessageBoxIcon icon, System.Windows.Forms.MessageBoxDefaultButton defaultButton, System.Windows.Forms.MessageBoxOptions options, string helpFilePath, System.Windows.Forms.HelpNavigator navigator, object param)
 {
     return(System.Windows.Forms.MessageBox.Show(text: text, caption: caption, buttons: buttons, icon: icon, defaultButton: defaultButton, options: options | System.Windows.Forms.MessageBoxOptions.RightAlign | System.Windows.Forms.MessageBoxOptions.RtlReading, helpFilePath: helpFilePath, navigator: navigator, param: param));
 }
示例#13
0
 public static System.Windows.Forms.DialogResult Show(System.Windows.Forms.IWin32Window owner, string text, string caption, System.Windows.Forms.MessageBoxButtons buttons, System.Windows.Forms.MessageBoxIcon icon, System.Windows.Forms.MessageBoxDefaultButton defaultButton, string helpFilePath, System.Windows.Forms.HelpNavigator navigator)
 {
     return(System.Windows.Forms.MessageBox.Show(owner: owner, text: text, caption: caption, buttons: buttons, icon: icon, defaultButton: defaultButton, options: System.Windows.Forms.MessageBoxOptions.RtlReading | System.Windows.Forms.MessageBoxOptions.RightAlign, helpFilePath: helpFilePath, navigator: navigator));
 }
 private void Info_Click(object sender, RoutedEventArgs e)
 {
     System.Windows.Forms.HelpNavigator navigator = System.Windows.Forms.HelpNavigator.Topic;
     System.Windows.Forms.Help.ShowHelp(null, "help.chm", navigator, "izmenenie_dannykh_polzovatelej.htm");
 }