private void btnDownload_btnPausing_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            Action <MeetingData>        action = null;
            _003C_003Ec__DisplayClass21 _003C_003Ec__DisplayClass = new _003C_003Ec__DisplayClass21();

            _003C_003Ec__DisplayClass.sender            = sender;
            _003C_003Ec__DisplayClass._003C_003E4__this = this;
            e.Handled = true;
            MouseTool.ShowLoading();
            if (NetworkTool.CheckNetwork() > 0)
            {
                string iD      = userMeeting.ID;
                string userID  = UserID;
                string userPWD = UserPWD;
                if (action == null)
                {
                    action = new Action <MeetingData>(_003C_003Ec__DisplayClass._003CbtnDownload_btnPausing_MouseLeftButtonDown_003Eb__1f);
                }
                GetMeetingData.AsyncPOST(iD, userID, userPWD, action);
            }
            else
            {
                DataTable dataTable = MSCE.GetDataTable("select MeetingJson from MeetingData where MeetingID=@1 and UserID =@2", userMeeting.ID, UserID);
                if (dataTable.Rows.Count > 0)
                {
                    MeetingData md = JsonConvert.DeserializeObject <MeetingData>(dataTable.Rows[0]["MeetingJson"].ToString());
                    GetMeetingData_DoAction(md, (Image)_003C_003Ec__DisplayClass.sender);
                }
                else
                {
                    AutoClosingMessageBox.Show("無法取得資料,請稍後再試");
                    MouseTool.ShowArrow();
                }
            }
        }
Exemple #2
0
        private void InitUI()
        {
            Action <LawData> action = null;

            MouseTool.ShowLoading();
            LawCT_Title.Text = Settings.Default.LawButtonName;
            new HttpRequest();
            if (NetworkTool.CheckNetwork() > 0)
            {
                if (action == null)
                {
                    action = new Action <LawData>(_003CInitUI_003Eb__1b);
                }
                GetLawData.AsyncPOST(action);
                return;
            }
            DataTable dataTable = MSCE.GetDataTable("select LawJson from LawData");

            if (dataTable.Rows.Count > 0)
            {
                LawData ld = JsonConvert.DeserializeObject <LawData>(dataTable.Rows[0]["LawJson"].ToString());
                GetLawData_DoAction(ld);
            }
            else
            {
                AutoClosingMessageBox.Show("無法取得資料,請稍後再試");
                MouseTool.ShowArrow();
            }
        }
 public PDFFactoryCT()
 {
     MouseTool.ShowLoading();
     InitializeComponent();
     base.Loaded   += new RoutedEventHandler(PDFFactoryCT_Loaded);
     base.Unloaded += new RoutedEventHandler(PDFFactoryCT_Unloaded);
 }
Exemple #4
0
 private void btnOpen_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
 {
     MouseTool.ShowLoading();
     try
     {
         _003C_003Ec__DisplayClass14 _003C_003Ec__DisplayClass = new _003C_003Ec__DisplayClass14();
         _003C_003Ec__DisplayClass._003C_003E4__this = this;
         ClickOnceTool.GetFilePath();
         _003C_003Ec__DisplayClass._bookPath      = lawItem.UnZipFilePath;
         _003C_003Ec__DisplayClass._bookId        = "";
         _003C_003Ec__DisplayClass._account       = "";
         _003C_003Ec__DisplayClass._userName      = "";
         _003C_003Ec__DisplayClass._email         = "";
         _003C_003Ec__DisplayClass._meetingId     = "";
         _003C_003Ec__DisplayClass._watermark     = "";
         _003C_003Ec__DisplayClass._dbPath        = Path.Combine(ClickOnceTool.GetDataPath(), Settings.Default.bookInfo_Path);
         _003C_003Ec__DisplayClass._isSync        = false;
         _003C_003Ec__DisplayClass._isSyncOwner   = false;
         _003C_003Ec__DisplayClass._webServiceUrl = WsTool.GetUrl() + "/AnnotationUpload";
         _003C_003Ec__DisplayClass._socketMessage = "";
         _003C_003Ec__DisplayClass.cbBooksData    = null;
         _003C_003Ec__DisplayClass.Home_Window    = Enumerable.FirstOrDefault(Enumerable.OfType <Home>(Application.Current.Windows));
         _003C_003Ec__DisplayClass.Home_Window.CloseAllWindow("", true);
         Task.Factory.StartNew(new Action(_003C_003Ec__DisplayClass._003CbtnOpen_MouseLeftButtonDown_003Eb__12));
     }
     catch (Exception ex)
     {
         LogTool.Debug(ex);
     }
     MouseTool.ShowArrow();
 }
Exemple #5
0
        private void CallAddNewMeeting()
        {
            MouseTool.ShowLoading();

            string txtPinCode = "";

            //在這裡show出視窗
            if (PaperLess_Emeeting.Properties.Settings.Default.IsNewMeeting_PopupDialog == true)
            {
                ConfirmWindow cw = new ConfirmWindow();
                if (cw.ShowDialog() == true)
                {
                    txtPinCode = cw.tbPinCode.Text.Trim();
                }
                else
                {
                    return;
                }
            }
            else
            {
                txtPinCode = this.txtPinCode.Text.Trim();
            }

            if (txtPinCode.Equals(""))
            {
                AutoClosingMessageBox.Show(string.Format("請先輸入{0}識別碼", PaperLess_Emeeting.Properties.Settings.Default.CourseOrMeeting_String));
                return;
            }

            // 非同步POST方法
            GetNewMeeting.AsyncPOST(UserID, txtPinCode, (XmlDataString) => { GetNewMeeting_DoAction(XmlDataString); });
        }
 public Login()
 {
     MouseTool.ShowLoading();
     base.WindowStartupLocation = WindowStartupLocation.CenterScreen;
     InitializeComponent();
     base.Loaded += new RoutedEventHandler(Login_Loaded);
 }
Exemple #7
0
        private void btnOpen_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            MouseTool.ShowLoading();

            try
            {
                //string AppPath = AppDomain.CurrentDomain.BaseDirectory;
                string filePath = ClickOnceTool.GetFilePath();

                //string _bookPath = System.IO.Path.Combine(AppPath, lawItem.UnZipFilePath);
                string _bookPath      = lawItem.UnZipFilePath;
                string _bookId        = "";
                string _account       = "";
                string _userName      = "";
                string _email         = "";
                string _meetingId     = "";
                string _watermark     = "";
                string _dbPath        = System.IO.Path.Combine(ClickOnceTool.GetDataPath(), PaperLess_Emeeting.Properties.Settings.Default.bookInfo_Path);
                bool   _isSync        = false;
                bool   _isSyncOwner   = false;
                string _webServiceUrl = WsTool.GetUrl() + "/AnnotationUpload";
                string _socketMessage = "";


                // 呼叫一個事件取得 BookVMs
                //Dictionary<string, BookVM> cbBooksData = new Dictionary<string, BookVM>();
                //if (LawListCT_GetBookVMs_ByMeetingFileCate_Event != null)
                //    cbBooksData = LawListCT_GetBookVMs_ByMeetingFileCate_Event(lawItem);

                Dictionary <string, BookVM> cbBooksData = null;
                Home Home_Window = Application.Current.Windows.OfType <Home>().FirstOrDefault();

                Home_Window.CloseAllWindow("", true);
                Task.Factory.StartNew(() =>
                {
                    this.Dispatcher.BeginInvoke((Action)(() =>
                    {
                        ReadWindow rw = new ReadWindow(cbBooksData, Home_Window.OpenBookFromReader, _bookPath, _bookId, _account
                                                       , _userName, _email, _meetingId
                                                       , _watermark, _dbPath, _isSync
                                                       , _isSyncOwner, _webServiceUrl, _socketMessage, null);
                        rw.HideCollectFile = true;
                        rw.WindowStyle = WindowStyle.None;
                        rw.WindowStartupLocation = WindowStartupLocation.CenterScreen;
                        rw.WindowState = WindowState.Maximized;
                        if (PaperLess_Emeeting.Properties.Settings.Default.AssemblyName.Contains("TPI4F") == true)
                        {
                            //rw.WindowStyle = WindowStyle.SingleBorderWindow;
                        }
                        rw.Show();
                    }));
                });
            }
            catch (Exception ex)
            {
                LogTool.Debug(ex);
            }

            MouseTool.ShowArrow();
        }
Exemple #8
0
        public Login()
        {
            MouseTool.ShowLoading();
            App.IsChangeWindow         = false;
            this.WindowStartupLocation = WindowStartupLocation.CenterScreen;
            InitializeComponent();

            // Disables inking in the WPF application and enables us to track touch events to properly trigger the touch keyboard
            InkInputHelper.DisableWPFTabletSupport();

            this.Loaded  += Login_Loaded;
            this.Closing += (sender, e) =>
            {
                if (App.IsChangeWindow == false)
                {
                    App.CopyLog();
                    //關閉應用程式
                    Application.Current.Shutdown();
                    //關閉處理序
                    Environment.Exit(0);
                }
            };
            //InitSelectDB();
            //InitUI();
            //InitEvent();

            //for test
            //NetworkTool.GetNetWork();
        }
        private void btnDownload_btnPausing_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            e.Handled = true;

            // 先撈一次MeetingData
            MouseTool.ShowLoading();
            //GetMeetingData.AsyncPOST(userMeeting.ID, UserID, UserPWD, (md) => { GetMeetingData_DoAction(md,(Image)sender); });
            if (NetworkTool.CheckNetwork() > 0)
            {
                GetMeetingData.AsyncPOST(userMeeting.ID, UserID, UserPWD, (md) => { GetMeetingData_DoAction(md, (Image)sender); });
            }
            else
            {
                //DB查詢登入
                DataTable dt = MSCE.GetDataTable("select MeetingJson from MeetingData where MeetingID=@1 and UserID =@2"
                                                 , userMeeting.ID
                                                 , UserID);

                if (dt.Rows.Count > 0)
                {
                    MeetingData md = JsonConvert.DeserializeObject <MeetingData>(dt.Rows[0]["MeetingJson"].ToString());
                    GetMeetingData_DoAction(md, (Image)sender);
                }
                else
                {
                    AutoClosingMessageBox.Show("無法取得資料,請稍後再試");
                    MouseTool.ShowArrow();
                }
            }
        }
Exemple #10
0
 public PDFFactoryCT()
 {
     MouseTool.ShowLoading();
     InitializeComponent();
     this.Loaded   += PDFFactoryCT_Loaded;
     this.Unloaded += PDFFactoryCT_Unloaded;
 }
 public SignListCT_Mix()
 {
     MouseTool.ShowLoading();
     InitializeComponent();
     this.Loaded += SignListCT_Mix_Loaded;
     //MouseTool.ShowArrow();
 }
Exemple #12
0
 public LawListCT()
 {
     MouseTool.ShowLoading();
     InitializeComponent();
     base.Loaded           += new RoutedEventHandler(LawListCT_Loaded);
     base.Unloaded         += new RoutedEventHandler(LawListCT_Unloaded);
     base.IsVisibleChanged += new DependencyPropertyChangedEventHandler(LawListCT_IsVisibleChanged);
 }
Exemple #13
0
 public BroadcastCT()
 {
     MouseTool.ShowLoading();
     InitializeComponent();
     tokenSource    = new CancellationTokenSource();
     this.Loaded   += BroadcastCT_Loaded;
     this.Unloaded += BroadcastCT_Unloaded;
 }
 public BroadcastCT()
 {
     MouseTool.ShowLoading();
     InitializeComponent();
     tokenSource    = new CancellationTokenSource();
     base.Loaded   += new RoutedEventHandler(BroadcastCT_Loaded);
     base.Unloaded += new RoutedEventHandler(BroadcastCT_Unloaded);
 }
Exemple #15
0
 public SignPictureCT(Home_ChangeTogSignPadCT_Function callback1, Home_GoBackTogSignPictureCT_Function callback2)
 {
     MouseTool.ShowLoading();
     InitializeComponent();
     Home_ChangeTogSignPadCT_Event     += callback1;
     Home_GoBackTogSignPictureCT_Event += callback2;
     base.Loaded += new RoutedEventHandler(SignPictureCT_Loaded);
 }
Exemple #16
0
 public SignPictureCT(Home_ChangeTogSignPadCT_Function callback1, Home_GoBackTogSignPictureCT_Function callback2)
 {
     MouseTool.ShowLoading();
     InitializeComponent();
     this.Home_ChangeTogSignPadCT_Event     += callback1;
     this.Home_GoBackTogSignPictureCT_Event += callback2;
     this.Loaded += SignPictureCT_Loaded;
     //MouseTool.ShowArrow();
 }
 public LawListCT(string ButtonName)
 {
     MouseTool.ShowLoading();
     this.ButtonName = ButtonName;
     InitializeComponent();
     this.Loaded           += LawListCT_Loaded;
     this.Unloaded         += LawListCT_Unloaded;
     this.IsVisibleChanged += LawListCT_IsVisibleChanged;
     //MouseTool.ShowArrow();
 }
Exemple #18
0
        private void _003CInitEvent_003Eb__11(object sender, MouseButtonEventArgs e)
        {
            MessageBoxResult messageBoxResult = MessageBox.Show("您確定要簽退?", "系統訊息", MessageBoxButton.YesNo);

            if (messageBoxResult == MessageBoxResult.Yes)
            {
                MouseTool.ShowLoading();
                GetSignOutUpload.AsyncPOST(MeetingID, DeptID, UserID, new Action <SignOut>(_003CInitEvent_003Eb__12));
            }
        }
Exemple #19
0
 public MVWindow(string FilePath, string pageJson = "")
 {
     MouseTool.ShowLoading();
     InitializeComponent();
     this.FilePath  = FilePath;
     FileID         = FileID;
     this.pageJson  = pageJson;
     base.Loaded   += new RoutedEventHandler(MVWindow_Loaded);
     base.Unloaded += new RoutedEventHandler(MVWindow_Unloaded);
 }
Exemple #20
0
 public SeriesMeetingCT(string UserID, string UserPWD, SeriesData seriesData, string NowSeriesID = "")
 {
     MouseTool.ShowLoading();
     InitializeComponent();
     this.UserID      = UserID;
     this.UserPWD     = UserPWD;
     this.seriesData  = seriesData;
     this.NowSeriesID = NowSeriesID;
     base.Loaded     += new RoutedEventHandler(SeriesMeetingCT_Loaded);
     base.Unloaded   += new RoutedEventHandler(SeriesMeetingCT_Unloaded);
 }
 private void SeriesMenu_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
 {
     MouseTool.ShowLoading();
     btnImg.Source            = new BitmapImage(new Uri("images/icon_arrow_active.png", UriKind.Relative));
     base.Background          = ColorTool.HexColorToBrush("#019fde");
     txtSeriesName.Foreground = Brushes.White;
     if (this.SeriesMeetingCT_ChangeMeetingRoomWP_Event != null)
     {
         this.SeriesMeetingCT_ChangeMeetingRoomWP_Event(seriesDataSeriesMeetingSeries.ID);
     }
 }
Exemple #22
0
 public MVWindow(string FilePath, string pageJson = "")
 {
     MouseTool.ShowLoading();
     InitializeComponent();
     this.FilePath  = FilePath;
     this.FileID    = FileID;
     this.pageJson  = pageJson;
     this.Loaded   += MVWindow_Loaded;
     this.Unloaded += MVWindow_Unloaded;
     //MouseTool.ShowArrow();
 }
Exemple #23
0
 public MVWindow(Dictionary <string, BookVM> cbBooksData, Home_OpenBookFromReader_Function callback, string FilePath, string FileID, string pageJson = "")
 {
     MouseTool.ShowLoading();
     InitializeComponent();
     this.cbBooksData = cbBooksData;
     this.Home_OpenBookFromReader_Event = callback;
     this.FilePath  = FilePath;
     this.FileID    = FileID;
     this.pageJson  = pageJson;
     base.Loaded   += new RoutedEventHandler(MVWindow_Loaded);
     base.Unloaded += new RoutedEventHandler(MVWindow_Unloaded);
 }
Exemple #24
0
 public SeriesMeetingCT(string UserID, string UserPWD, SeriesData seriesData, string NowSeriesID = "")
 {
     MouseTool.ShowLoading();
     InitializeComponent();
     this.UserID      = UserID;
     this.UserPWD     = UserPWD;
     this.seriesData  = seriesData;
     this.NowSeriesID = NowSeriesID;
     this.Loaded     += SeriesMeetingCT_Loaded;
     this.Unloaded   += SeriesMeetingCT_Unloaded;
     //MouseTool.ShowArrow();
 }
Exemple #25
0
 public SignPadCT(string UserID = "", string UserName = "", string DeptID = "", string PicUrl = "", Home_GoBackTogSignPictureCT_Function callback1 = null)
 {
     MouseTool.ShowLoading();
     InitializeComponent();
     this.UserID   = UserID;
     this.UserName = UserName;
     this.DeptID   = DeptID;
     this.PicUrl   = PicUrl;
     Home_GoBackTogSignPictureCT_Event += callback1;
     sb             = (Storyboard)TryFindResource("sb");
     base.Loaded   += new RoutedEventHandler(SignPadCT_Loaded);
     base.Unloaded += new RoutedEventHandler(SignPadCT_Unloaded);
 }
 private void InitUI()
 {
     MouseTool.ShowLoading();
     switch (meetingUserType)
     {
     case MeetingUserType.議事管理人員:
         CateBtnS.Visibility    = Visibility.Visible;
         SearchInput.Visibility = Visibility.Visible;
         btnAddUser.Visibility  = Visibility.Visible;
         break;
     }
     GetSigninData.AsyncPOST(MeetingID, new Action <SigninData>(_003CInitUI_003Eb__29));
 }
        private void InitUI()
        {
            MouseTool.ShowLoading();
            //LawCT_Title.Text = MyPL.Properties.Settings.Default.LawButtonName;
            txtTitle.Text = ButtonName;
            //Network.HttpRequest hr = new Network.HttpRequest();
            if (1 == 1 || NetworkTool.CheckNetwork() > 0)
            {
                // 非同步POST方法
                //GetLawData.AsyncPOST((ld) => { GetLawData_DoAction(ld); });
                GetUserFolder.AsyncPOST(UserID, UserPWD, (fd) => { GetUserFolder_DoAction(fd); });
                //, () => { this.Dispatcher.BeginInvoke(new Action(() => { AutoClosingMessageBox.Show("無法取得資料,請稍後再試"); })); });
            }
            else
            {
                DataTable dt = MSCE.GetDataTable("select LawJson from LawData");


                if (dt.Rows.Count > 0)
                {
                    LawData ld = JsonConvert.DeserializeObject <LawData>(dt.Rows[0]["LawJson"].ToString());
                    GetLawData_DoAction(ld);
                }
                else
                {
                    AutoClosingMessageBox.Show("無法取得資料,請稍後再試");
                    MouseTool.ShowArrow();
                }
            }



            #region  步POST
            //LawData lawData = GetLawData.POST();

            //if (lawData != null)
            //{
            //    int i=0;
            //    foreach (LawDataLaw item in lawData.LawList)
            //    {
            //        i++;
            //        bool IsLastRow= (i==lawData.LawList.Length);
            //        LawRowSP.Children.Add(new LawRow(item,IsLastRow, LawListCT_HangTheDownloadEvent_Callback));
            //    }
            //}
            //else
            //{
            //    AutoClosingMessageBox.Show("無法取得資料,請稍後再試");
            //}
            #endregion
        }
Exemple #28
0
        private void btnYes_MouseDown(object sender, MouseButtonEventArgs e)
        {
            if (StackLines.Count < 1 || txtPLS.Visibility == Visibility.Visible)
            {
                if (!PicUrl.Equals(""))
                {
                    MessageBox.Show("已簽名,欲重新簽名請先按x清除");
                }
                else
                {
                    MessageBox.Show("請簽名後上傳");
                }
                return;
            }
            string    text      = "";
            DataTable dataTable = MSCE.GetDataTable("select AllowIpRange from NowLogin");

            if (dataTable.Rows.Count > 0)
            {
                text = dataTable.Rows[0]["AllowIpRange"].ToString();
            }
            if (!text.Equals("") && !IpTool.CheckInNowWifi(text))
            {
                string courseOrMeeting_String = Settings.Default.CourseOrMeeting_String;
                AutoClosingMessageBox.Show(string.Format("您不在{0}室範圍內,無法使用此功能", courseOrMeeting_String.Equals("課程") ? "教" : courseOrMeeting_String));
                return;
            }
            string path = System.IO.Path.Combine(ClickOnceTool.GetFilePath(), Settings.Default.SignInFolder);

            path = System.IO.Path.Combine(path, MeetingID, UserID);
            Directory.CreateDirectory(path);
            string      str     = Guid.NewGuid().ToString();
            string      path2   = str + ".png";
            string      text2   = System.IO.Path.Combine(path, path2);
            Application current = Application.Current;

            CanvasTool.SaveCanvas(current.Windows[0], SignPad, 96, text2);
            MouseTool.ShowLoading();
            if (UserID.Equals("guest"))
            {
                UserID_Origin = UserID;
                UserID        = "";
            }
            else if (UserID.Equals("dept"))
            {
                UserID_Origin = UserID;
                UserID        = "";
            }
            GetSigninDataUpload.AsyncPOST(MeetingID, UserID, DeptID, text2, new Action <SigninDataUpload>(_003CbtnYes_MouseDown_003Eb__1f));
        }
Exemple #29
0
        public ConfirmWindow()
        {
            MouseTool.ShowLoading();
            InitializeComponent();
            base.Loaded  += new RoutedEventHandler(ConfirmWindow_Loaded);
            base.KeyDown += new KeyEventHandler(ConfirmWindow_KeyDown);
            Window window = Enumerable.FirstOrDefault(Enumerable.OfType <Home>(Application.Current.Windows));

            if (window != null)
            {
                base.Owner = window;
            }
            base.WindowStartupLocation = WindowStartupLocation.CenterScreen;
        }
Exemple #30
0
 public SignPadCT(string UserID = "", string UserName = "", string DeptID = "", string PicUrl = "", Home_GoBackTogSignPictureCT_Function callback1 = null)
 {
     MouseTool.ShowLoading();
     InitializeComponent();
     this.UserID   = UserID;
     this.UserName = UserName;
     this.DeptID   = DeptID;
     this.PicUrl   = PicUrl;
     this.Home_GoBackTogSignPictureCT_Event += callback1;
     sb             = (Storyboard)this.TryFindResource("sb");
     this.Loaded   += SignPadCT_Loaded;
     this.Unloaded += SignPadCT_Unloaded;
     //MouseTool.ShowArrow();
 }