Ejemplo n.º 1
0
        public TagSetting(long id)
        {
            InitializeComponent();
            Label title = FindName("poll_title") as Label;

            title.Content = id;
            poll_id       = id;
            tagService    = new TagService();
            pollService   = new PollService();
            Poll poll = pollService.getPoll(poll_id);

            this.poll_title.Content = poll.Name + " 列表池";
            tagList = new BindingList <Tag>(tagService.queryAllList(id));
            this.tagListView.ItemsSource = tagList;
        }
Ejemplo n.º 2
0
        public MainWindow()
        {
            InitializeComponent();
            indexs = new Dictionary <long, int>();
            string directory = Environment.CurrentDirectory + "/data";
            string dbPath    = directory + "/SqliteModel.db";
            bool   exists    = File.Exists(dbPath);

            if (!Directory.Exists(directory))
            {
                Directory.CreateDirectory(directory);
            }
            dBManager = new DBManager(dbPath);
            if (!exists)
            {
                initTable();
            }
            templateService = new TemplateService();
            tagService      = new TagService();
            loadWindow();
        }