Esempio n. 1
0
        private void TaskListView_MouseDoubleCick(object sender, MouseButtonEventArgs e)
        {
            WorkTask selected = (sender as ListView).SelectedItem as WorkTask;

            if (selected == null)
            {
                return;
            }
            else if (SelectedTask != null && SelectedTask.Equals(selected))
            {
                TitleTextbox.Text            = "";
                DescribeTextbox.Text         = "";
                TaskPriorityTextbox.Text     = "";
                AccomplishCheckBox.IsChecked = false;
                AddFileBtn.IsEnabled         = false;
                FileListbox.ItemsSource      = null;

                SelectedTask = null;

                return;
            }

            TitleTextbox.Text            = selected.Title;
            DescribeTextbox.Text         = selected.Content;
            TaskPriorityTextbox.Text     = selected.Priority.ToString();
            AccomplishCheckBox.IsChecked = selected.Accomplished;
            FileListbox.ItemsSource      = IOBusiness.GetTaskFileNames(BusinessName, selected.Title);
            AddFileBtn.IsEnabled         = true;

            SelectedTask = selected;
        }
Esempio n. 2
0
 private void DirectoryInit(string businessName)
 {
     if (!Directory.Exists($"./{businessName}"))
     {
         IOBusiness.CreateBusinessDirectory(businessName);
     }
 }
Esempio n. 3
0
 public void RefreshTaskFiles()
 {
     if (SelectedTask != null)
     {
         FileListbox.ItemsSource = IOBusiness.GetTaskFileNames(BusinessName, SelectedTask.Title);
     }
 }
Esempio n. 4
0
        //Load Serialized Diagram Information and Adding ui elements on Canvas
        private void DiagramCanvas_Loaded(object sender, RoutedEventArgs e)
        {
            var brushConverter = new BrushConverter();

            if (File.Exists($"./{BusinessName}/{FileNames.DiagramControlsSave}"))
            {
                var elements = IOBusiness.Load <DiagramUIElement>($"./{BusinessName}/{FileNames.DiagramControlsSave}");
                int tagCount = 0;
                foreach (var element in elements)
                {
                    CreateDiagramUIElement(tagCount++, element.Title, element.Content,
                                           (Thickness) new ThicknessConverter().ConvertFromString(element.Margin),
                                           new BrushConverter().ConvertFromString(element.BackgroundColorHex) as SolidColorBrush);
                }
            }
            if (File.Exists($"./{BusinessName}/{FileNames.DiagramLinesSave}"))
            {
                var lines = IOBusiness.Load <DiagramUILine>($"./{BusinessName}/{FileNames.DiagramLinesSave}");
                foreach (var line in lines)
                {
                    CreateDiagramUILine(line.StartElementTag, line.EndElementTag
                                        , new Point(line.x1, line.y1), new Point(line.x2, line.y2),
                                        brushConverter.ConvertFromString(line.strokeColorHex) as SolidColorBrush);
                }
            }
        }
Esempio n. 5
0
        //</Window title bar>
        private bool SaveDiagramInformations()
        {
            //saving locations and stacks
            if (!IOBusiness.ExistBusiness(BusinessName))
            {
                IOBusiness.CreateBusinessDirectory(BusinessName);
            }

            var    duie              = DiagramUIPanelToDiagramUIElements(DiagramUIElements);
            var    diaUiLines        = DiagramLineToUILines(DiagramLines);
            string businessDirectory = $"./{BusinessName}/";

            IOBusiness.Save(businessDirectory + FileNames.DiagramControlsSave, duie);
            IOBusiness.Save(businessDirectory + FileNames.DiagramLinesSave, diaUiLines);
            return(true);
        }
Esempio n. 6
0
        //</Memo>
        //<According>
        private void AttachAccountingFile_Click(object sender, RoutedEventArgs e)
        {
            if (!Directory.Exists($"./{BusinessName}"))
            {
                IOBusiness.CreateBusinessDirectory(BusinessName);
            }

            OpenFileDialog ofd = new OpenFileDialog();

            if (ofd.ShowDialog() == true)
            {
                IOBusiness.AttachFileToAccountBook(BusinessName, ofd.FileName);

                BusinessMessageBox.Show("회계장부가 등록되었습니다.", "회계장부 파일");

                RefreshAccountingFiles();
            }
        }
Esempio n. 7
0
        //Add Task File To taskDirectory ( csv, py any else)
        private void AddFileBtn_Click(object sender, RoutedEventArgs e)
        {
            if (SelectedTask == null)
            {
                return;
            }

            if (!Directory.Exists($"./{BusinessName}/{SelectedTask.Title}"))
            {
                IOBusiness.CreateTaskDirectory(BusinessName, SelectedTask.Title);
            }

            OpenFileDialog ofd = new OpenFileDialog();

            if (ofd.ShowDialog() == true)
            {
                IOBusiness.AttachFileToTask(BusinessName, SelectedTask.Title, ofd.FileName);

                BusinessMessageBox.Show("파일 추가가 완료되었습니다.", "업무 파일");

                RefreshTaskFiles();
            }
        }
Esempio n. 8
0
 private void AccountList_Loaded(object sender, RoutedEventArgs e)
 {
     AccountingListview.ItemsSource = IOBusiness.GetAccountBooks(BusinessName);
 }
Esempio n. 9
0
 public void RefreshAccountingFiles()
 {
     AccountingListview.ItemsSource = IOBusiness.GetAccountBooks(BusinessName);
 }