Beispiel #1
0
        public PhoneBook()
        {
            InitializeComponent();

            name_TextBox.Focus();

            WndConfig.setConfig4SimpleSearch(this);
        }
Beispiel #2
0
        public PriceConfig()
        {
            InitializeComponent();

            price          = new DispatcherTimer();
            price.Interval = TimeSpan.FromSeconds(1);
            price.Tick    += new EventHandler(price_Tick);
            price.Start();

            WndConfig.setConfig4SimpleSearch(this);
        }
        public WindowConfig()
        {
            InitializeComponent();

            WndConfig.setConfig4SimpleSearch(this);

            ConfigParams param = WndConfig.getConfig();

            fontSize_Txt.Text        = param.fontSize.ToString();
            big_CheckBox.IsChecked   = param.isMaximized;
            small_CheckBox.IsChecked = param.simpleIsMaximized;
        }
Beispiel #4
0
        public static void setConfig4SimpleSearch(Window w)
        {
            ConfigParams cp = WndConfig.getConfig();

            if (cp.simpleIsMaximized)
            {
                w.WindowState = WindowState.Maximized;
            }
            else
            {
                w.WindowState = WindowState.Normal;
            }
            w.FontSize = cp.fontSize;
        }
Beispiel #5
0
        public static void setConfiguration(Window w)
        {
            ConfigParams cp = WndConfig.getConfig();

            if (cp.isMaximized)
            {
                w.WindowState = WindowState.Maximized;
            }
            else
            {
                w.WindowState = WindowState.Normal;
            }
            w.FontSize = cp.fontSize;
        }
        public Login()
        {
            InitializeComponent();
            username.Focus();

            ConfigParams cp = WndConfig.getConfig();

            this.FontSize = cp.fontSize;


            // for farsi language =>
            InputSimulator.SimulateKeyDown(VirtualKeyCode.SHIFT);
            InputSimulator.SimulateKeyPress(VirtualKeyCode.LMENU);
            InputSimulator.SimulateKeyUp(VirtualKeyCode.SHIFT);
            InputSimulator.SimulateKeyPress(VirtualKeyCode.LMENU);
        }
 private void applyButton_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         ConfigParams param = new ConfigParams();
         param.fontSize          = Int32.Parse(fontSize_Txt.Text);
         param.isMaximized       = big_CheckBox.IsChecked.Value;
         param.simpleIsMaximized = small_CheckBox.IsChecked.Value;
         WndConfig.saveConfig(param);
         MessageBox.Show("تغییرات با موفقیت اعمال گردیدند", "اعمال تغییرات", MessageBoxButton.OK, MessageBoxImage.Information);
         Close();
     }
     catch (Exception)
     {
         MessageBox.Show("لطفا اطلاعات را با دقت بیشتری وارد نمایید", "خطا", MessageBoxButton.OK, MessageBoxImage.Error);
     }
 }