Exemplo n.º 1
0
        private void ModalDialog_PaperSetting_ExitAllModal(object sender, RoutedEventArgs e)
        {
            ChildControl.SettingLayoutPrinting ucontrol = ModalDialog_PaperSetting.Children[0] as ChildControl.SettingLayoutPrinting;
            DataPaperSizeSetting dataPaperSizeSetting   = ucontrol.DataContext as DataPaperSizeSetting;

            dataPaperSizeSetting.PaperSizeW   = (int)Settings.Default["SizeWidth"];
            dataPaperSizeSetting.PaperSizeH   = (int)Settings.Default["SizeHeight"];
            dataPaperSizeSetting.BarcodeSizeW = (int)Settings.Default["BarcodeW"];
            dataPaperSizeSetting.BarcodeSizeH = (int)Settings.Default["BarcodeH"];

            switch (Settings.Default["HorizontalAlignment"].ToString())
            {
            case "Left":
                dataPaperSizeSetting.Horizo = dataPaperSizeSetting.Horizos[0];
                break;

            case "Stretch":
                dataPaperSizeSetting.Horizo = dataPaperSizeSetting.Horizos[1];
                break;

            case "Right":
                dataPaperSizeSetting.Horizo = dataPaperSizeSetting.Horizos[2];
                break;
            }
        }
Exemplo n.º 2
0
        private void ModalDialog_PaperSetting_OKModal(object sender, RoutedEventArgs e)
        {
            ChildControl.SettingLayoutPrinting ucontrol = ModalDialog_PaperSetting.Children[0] as ChildControl.SettingLayoutPrinting;
            DataPaperSizeSetting dataPaperSizeSetting   = ucontrol.DataContext as DataPaperSizeSetting;

            Settings.Default["SizeWidth"]           = dataPaperSizeSetting.PaperSizeW;
            Settings.Default["SizeHeight"]          = dataPaperSizeSetting.PaperSizeH;
            Settings.Default["BarcodeW"]            = dataPaperSizeSetting.BarcodeSizeW;
            Settings.Default["BarcodeH"]            = dataPaperSizeSetting.BarcodeSizeH;
            Settings.Default["HorizontalAlignment"] = dataPaperSizeSetting.Horizo.Value.ToString();
            Settings.Default.Save();
        }
Exemplo n.º 3
0
 private void ModalDialog_PrintBarcode_OKModal(object sender, RoutedEventArgs e)
 {
     ModalDialog_PrintBarcode.HideHandlerDialog();
     if (!bg_worker.IsBusy)
     {
         ChildControl.SettingLayoutPrinting ucontrol = ModalDialog_PaperSetting.Children[0] as ChildControl.SettingLayoutPrinting;
         DataPaperSizeSetting dataPaperSizeSetting   = ucontrol.DataContext as DataPaperSizeSetting;
         List <object>        listData = new List <object>();
         listData.Add(DataContext as DataListPrinting);
         listData.Add(dataPaperSizeSetting);
         bg_worker.RunWorkerAsync(listData);
         ButtonCloseProgressBar.Visibility = Visibility.Visible;
     }
 }