コード例 #1
0
ファイル: Form1.cs プロジェクト: paulduran/mediamanager
        private void DoSearch(IAppHelper helper)
        {
            statusLabel.Text = "Performing Search. Please Wait...";
            this.Cursor      = Cursors.WaitCursor;
            // use an app helper to locate information
            //helper = appHelperFactory.GetAppHelper(appHelper);
            AppHelperContext context = new SimpleAppHelperContext();

            context["title"] = txtMovieName.Text;
            AppHelperItem[] items = helper.LocateItems(context);

            statusLabel.Text = null;
            this.Cursor      = Cursors.Default;

            switch (items.Length)
            {
            case 0:
                MessageBox.Show("No Match Found for: " + txtMovieName.Text);
                break;

            case 1:
                AppHelperItemSelected(helper, items[0]);
                break;

            default:
                AppHelperResultSelector resultSelector = new AppHelperResultSelector(helper);
                resultSelector.ItemSelectedEvent += new AppHelperItemSelected(AppHelperItemSelected);
                resultSelector.Items              = items;
                resultSelector.Show();
                break;
            }
        }
コード例 #2
0
 private void btnSearch_Click(object sender, EventArgs e)
 {
     string appHelperName = (string)drpHelperNames.SelectedItem;
     string contextFieldName = null;
     foreach (Control c in tblInputContext.Controls)
     {
         if (c is Label)
         {
             contextFieldName = c.Text;
         }
         else if (c is TextBox)
         {
             if (contextFieldName != null && c.Text.Length > 0)
                 context[contextFieldName] = c.Text;
             else if (contextFieldName != null)
                 context[contextFieldName] = null;
         }
     }
     helper = factory.GetAppHelper(appHelperName);
     drpResults.Controls.Clear();
     AppHelperItem []items = helper.LocateItems(context);
     foreach (AppHelperItem item in items)
     {
         drpResults.Items.Add(new ItemHolder(item));
     }
 }
コード例 #3
0
ファイル: KListViewItem.cs プロジェクト: tmbx/kwm
        public KListViewItem(KfsStatusPath obj, IAppHelper _helper)
        {
            /* Create all subitems, without any text in them */
            CustomListViewSubItem subItem;
            m_helper = _helper;

            subItem = new CustomListViewSubItem();
            subItem.Name = SizeKey;
            AddCustomSubItem(subItem);

            subItem = new CustomListViewSubItem();
            subItem.Name = TransferStatusKey;
            AddCustomSubItem(subItem);

            subItem = new CustomListViewSubItem();
            subItem.Name = ModifiedDateKey;
            AddCustomSubItem(subItem);

            subItem = new CustomListViewSubItem();
            subItem.Name = ModifiedByKey;
            AddCustomSubItem(subItem);

            subItem = new CustomListViewSubItem();
            subItem.Name = StatusKey;
            AddCustomSubItem(subItem);

            subItem = new CustomListViewSubItem();
            subItem.Name = CommitIDKey;
            AddCustomSubItem(subItem);

            UpdateInfos(obj);
        }
コード例 #4
0
 public MaterialsAPIController(IMaterialsRepository materialsRepository, IAppHelper appHelper, ILogger <MaterialsAPIController> logger, IMapper iMapper)
 {
     _materialsRepository = materialsRepository;
     _appHelper           = appHelper;
     _logger  = logger;
     _iMapper = iMapper;
 }
コード例 #5
0
        private void btnSearch_Click(object sender, EventArgs e)
        {
            string appHelperName    = (string)drpHelperNames.SelectedItem;
            string contextFieldName = null;

            foreach (Control c in tblInputContext.Controls)
            {
                if (c is Label)
                {
                    contextFieldName = c.Text;
                }
                else if (c is TextBox)
                {
                    if (contextFieldName != null && c.Text.Length > 0)
                    {
                        context[contextFieldName] = c.Text;
                    }
                    else if (contextFieldName != null)
                    {
                        context[contextFieldName] = null;
                    }
                }
            }
            helper = factory.GetAppHelper(appHelperName);
            drpResults.Controls.Clear();
            AppHelperItem [] items = helper.LocateItems(context);
            foreach (AppHelperItem item in items)
            {
                drpResults.Items.Add(new ItemHolder(item));
            }
        }
コード例 #6
0
ファイル: KwsApp.cs プロジェクト: fdgonthier/TbxLib
 /// <summary>
 /// Initialization code common to both the deserialized and
 /// non-deserialized cases. This method must be called explicitly
 /// when the workspace is deserialized.
 /// </summary>
 public virtual void Initialize(IAppHelper appHelper)
 {
     Helper = appHelper;
     Helper.OnKwsStatusChanged += OnKwsStatusChangedInternal;
     AppStatus = KwsAppStatus.Stopped;
     DirtyFlag = false;
 }
コード例 #7
0
        public AppKfsCreateItem(IAppHelper _helper, List<KfsServerOp> _operations)
            : base(_helper, _operations)
        {
            Debug.Assert(m_ops.Count > 0);

            FirstOp = m_ops[0] as KfsCreateServerOp;

            Debug.Assert(FirstOp != null);
        }
コード例 #8
0
ファイル: Form1.cs プロジェクト: paulduran/mediamanager
        private void AppHelperItemSelected(IAppHelper helper, AppHelperItem item)
        {
            System.Diagnostics.Debug.WriteLine(string.Format("got selected item. name: {0}. value: {1}", item.Name, item.Value));
            AppHelperContext context = new SimpleAppHelperContext();

            if (helper.LoadItem(item, context))
            {
                // if (context["title"] != null)
                //     this.txtMovieName.Text = (string)context["title"];
                MediaItem.ReadFrom(context);
                UpdateDisplay();
            }
        }
コード例 #9
0
 public MenuFactory(IStartupHelper startupHelper
                    , IWindowsManager windowsManager, IAppHelper appHelper,
                    ISettingsManager <ApplicationSettings> settingsManager, ISupportMailContentGenerator supportMailContentGenerator,
                    IServiceProxy serviceProxy, IActiveDevice activeDevice, IMetaPubSub metaMessenger)
 {
     _startupHelper               = startupHelper;
     _windowsManager              = windowsManager;
     _appHelper                   = appHelper;
     _settingsManager             = settingsManager;
     _supportMailContentGenerator = supportMailContentGenerator;
     _serviceProxy                = serviceProxy;
     _activeDevice                = activeDevice;
     _metaMessenger               = metaMessenger;
 }
コード例 #10
0
ファイル: Notification.cs プロジェクト: fdgonthier/TbxLib
        public NotificationItem(AnpMsg _msg, UInt32 appID, IAppHelper _helper)
        {
            m_helper             = _helper;
            m_appID              = appID;
            m_notificationToTake = DefaultEffect;

            // Show a popup only if the event occured after we logged on the
            // workspace and we caught up with the KAS events. In some cases we
            // do not add an Anp message to this object, simply check for the
            // CaughtUp flag.
            WantShowPopup = (_msg == null || _msg.ID > _helper.KwsLoginLatestEventId) &&
                            _helper.HasCaughtUpWithKasEvents();

            if (_msg != null)
            {
                Init(_msg);
            }
        }
コード例 #11
0
ファイル: KTreeviewNode.cs プロジェクト: tmbx/kwm
        public KTreeNode(KfsStatusPath obj, ImageListManager mgr, IAppHelper _helper)
            : base()
        {
            Debug.Assert(obj.IsDir());
            m_helper = _helper;

            m_childs = new SortedDictionary<string, KListViewItem>();
            m_onServer = obj.OnServer();

            m_lvImageListMgr = mgr;

            this.Text = obj.IsRoot() ? "Share" : obj.Name;
            this.ImageKey = "FolderClosed";
            this.SelectedImageKey = "FolderOpened";
            m_status = obj.Status;
            m_name = obj.Name;

            CreateChilds(obj);
        }
コード例 #12
0
        public MessageWindow(IAppHelper appHelper)
        {
            _appHelper = appHelper;

            InitializeComponent();
            Top           = SystemParameters.VirtualScreenTop + 1000;
            ShowInTaskbar = false;
            ShowActivated = false;
            Show();
            Hide();

            var        handler = new WindowInteropHelper(this).EnsureHandle();
            HwndSource source  = HwndSource.FromHwnd(handler);

            source.AddHook(WndProc);

            // Required for proper interaction with chromium-based browsers
            AutomationRegistrator.Instance.RegisterHook();
        }
コード例 #13
0
        public MainViewModel(IDeviceManager deviceManager,
                             IMenuFactory menuFactory,
                             IActiveDevice activeDevice,
                             IMetaPubSub metaMessenger,
                             ViewModelLocator viewModelLocator,
                             IAppHelper appHelper,
                             SoftwareUnlockSettingViewModel softwareUnlock)
        {
            _deviceManager    = deviceManager;
            _menuFactory      = menuFactory;
            _activeDevice     = activeDevice;
            _viewModelLocator = viewModelLocator;
            _appHelper        = appHelper;
            _softwareUnlock   = softwareUnlock;

            InitMenu();

            _deviceManager.DevicesCollectionChanged += Devices_CollectionChanged;
            _activeDevice.ActiveDeviceChanged       += ActiveDevice_ActiveDeviceChanged;

            metaMessenger.Subscribe <OpenPasswordManagerMessage>((p) => { MenuPasswordManager.IsChecked = true; return(Task.CompletedTask); });
            metaMessenger.Subscribe <OpenHideezKeyPageMessage>((p) => { MenuHardwareKeyPage.IsChecked = true; return(Task.CompletedTask); });
            metaMessenger.Subscribe <OpenMobileAuthenticatorPageMessage>((p) => { MenuSoftwareKeyPage.IsChecked = true; return(Task.CompletedTask); });
        }
コード例 #14
0
        public InfoButton()
        {
            InitializeComponent();

            _appHelper = App.Container.Resolve<IAppHelper>();
        }
コード例 #15
0
 public AttachManagementNotificationItem(IAppHelper helper, AnpMsg skurlCmd)
     : base(null, 0, helper)
 {
     m_emailSubject = skurlCmd.Elements[0].String;
     m_notificationToTake = NotificationEffect.ShowPopup;
 }
コード例 #16
0
ファイル: AppChatBox.cs プロジェクト: tmbx/kwm
 public override void Initialize(IAppHelper appHelper)
 {
     base.Initialize(appHelper);
     Settings = new AppChatboxControl.AppChatBoxSettings();
     Helper.OnKwsUserChanged += OnUserChanged;
     m_lastEventPopup = DateTime.MinValue;
 }
コード例 #17
0
ファイル: Form1.cs プロジェクト: paulduran/mediamanager
 private void AppHelperItemSelected(IAppHelper helper, AppHelperItem item)
 {
     System.Diagnostics.Debug.WriteLine(string.Format("got selected item. name: {0}. value: {1}", item.Name, item.Value));
     AppHelperContext context = new SimpleAppHelperContext();
     if (helper.LoadItem(item, context))
     {
        // if (context["title"] != null)
        //     this.txtMovieName.Text = (string)context["title"];
         MediaItem.ReadFrom(context);
         UpdateDisplay();
     }
 }
コード例 #18
0
ファイル: KwsApp.cs プロジェクト: fdgonthier/TbxLib
 /// <summary>
 /// Non-deserializating constructor.
 /// </summary>
 public KwsApp(IAppHelper appHelper)
 {
     Initialize(appHelper);
 }
コード例 #19
0
ファイル: KwsApp.cs プロジェクト: tmbx/kwm-release
 /// <summary>
 /// Non-deserializating constructor.
 /// </summary>
 public KwsApp(IAppHelper appHelper)
 {
     Initialize(appHelper);
 }
コード例 #20
0
ファイル: AppScreenSharing.cs プロジェクト: tmbx/kwm-release
 public AppScreenSharing(IAppHelper _helper)
     : base(_helper)
 {
     m_lstSharingSessions = new AppSharingSessionList();
 }
コード例 #21
0
ファイル: AppKfs.cs プロジェクト: tmbx/kwm-release
 public AppKfs(IAppHelper _helper)
     : base(_helper)
 {
 }
コード例 #22
0
ファイル: AppPublicBridge.cs プロジェクト: tmbx/kwm-release
 public AppPublicBridge(IAppHelper _helper)
     : base(_helper)
 {
 }
コード例 #23
0
ファイル: AppKfs.cs プロジェクト: tmbx/kwm-release
 public override void Initialize(IAppHelper appHelper)
 {
     base.Initialize(appHelper);
     if (m_share != null) m_share.Initialize();
 }
コード例 #24
0
 public ChatNotificationItem(AnpMsg _msg, IAppHelper _helper, bool _forceHidePopup)
     : base(_msg, KAnpType.KANP_NS_CHAT, _helper)
 {
     m_msg = _msg;
     m_forcedHidePopup = _forceHidePopup;
 }
コード例 #25
0
 public AuthController(UserManager <ApplicationUsers> userManager, IAppHelper appHelper, SignInManager <ApplicationUsers> signInManager)
 {
     _userManager   = userManager;
     _appHelper     = appHelper;
     _signInManager = signInManager;
 }
コード例 #26
0
ファイル: Tunnel.cs プロジェクト: tmbx/kwm
 public KwmTunnelThread(IAppHelper helper, String host, int port)
 {
     Helper = helper;
     Host = host;
     Port = port;
 }
コード例 #27
0
 public AppKfsNotificationItem(IAppHelper _helper, List<KfsServerOp> _operations)
     : base(null, KAnpType.KANP_NS_KFS, _helper)
 {
     m_ops = _operations;
 }
コード例 #28
0
 public AppHelperResultSelector(IAppHelper appHelper)
 {
     InitializeComponent();
     this.appHelper = appHelper;
 }
コード例 #29
0
        public AppKfsPhase2Item(IAppHelper _helper, List<KfsServerOp> _operations, SortedDictionary<UInt64, List<KfsServerOp>> seenPhase1Ops)
            : base(_helper, _operations)
        {
            Debug.Assert(m_ops.Count > 0);

            FirstOp = m_ops[0] as KfsPhase2ServerOp;
            Debug.Assert(seenPhase1Ops.ContainsKey(FirstOp.CommitID));
            // FIXME seenPhase1Ops might be empty if the KWM is closed between the phase1 and the phase2 event.
            m_seenPhase1Ops = seenPhase1Ops[FirstOp.CommitID];
            seenPhase1Ops.Remove(FirstOp.CommitID);

            Debug.Assert(FirstOp != null);
        }
コード例 #30
0
ファイル: AppSsNotificationItem.cs プロジェクト: tmbx/kwm
 public ScreenSharingNotificationItem(AnpMsg _msg, IAppHelper _helper)
     : base(_msg, KAnpType.KANP_NS_VNC, _helper)
 {
     if (m_eventType == KAnpType.KANP_EVT_VNC_START)
         m_sessionSubject = _msg.Elements[4].String;
 }
コード例 #31
0
        public KfsFileDownloadedNotificationItem(AnpMsg _msg, IAppHelper _helper, KfsServerFile f)
            : base(_msg, KAnpType.KANP_NS_KFS, _helper)
        {
            m_downloaderUID = _msg.Elements[2].UInt32;
            m_uploaderUID = f.CurrentVersion.UserID;
            m_fileName = f.Name;
            m_fileRelativePath = f.RelativePath;

            m_notificationToTake = NotificationEffect.ShowPopup;
        }
コード例 #32
0
ファイル: NotificationItem.cs プロジェクト: tmbx/kwm-release
        public NotificationItem(AnpMsg _msg, UInt32 appID, IAppHelper _helper)
        {
            m_helper = _helper;
            m_appID = appID;
            m_notificationToTake = DefaultEffect;

            // Show a popup only if the event occured after we logged on the
            // workspace and we caught up with the KAS events. In some cases we
            // do not add an Anp message to this object, simply check for the
            // CaughtUp flag.
            WantShowPopup = (_msg == null || _msg.ID > _helper.KwsLoginLatestEventId) &&
                            _helper.HasCaughtUpWithKasEvents();

            if (_msg != null) Init(_msg);
        }
コード例 #33
0
        public KfsNotification(IAppHelper _helper, List<KfsServerOp> _operations, SortedDictionary<UInt64, List<KfsServerOp>> seenPhase1Ops)
        {
            m_incomingServerOps = _operations;

            SeparateServerOpByType(seenPhase1Ops);

            if (m_createOps.Count > 0)
                Items.Add(new AppKfsCreateItem(_helper, m_createOps));

            if (m_deleteOps.Count > 0)
                Items.Add(new AppKfsDeleteItem(_helper, m_deleteOps));

            if (m_moveOps.Count > 0)
                Items.Add(new AppKfsMoveItem(_helper, m_moveOps));

            if (m_updateOps.Count > 0)
                Items.Add(new AppKfsUpdateItem(_helper, m_updateOps));

            if (m_phase2Ops.Count > 0)
                Items.Add(new AppKfsPhase2Item(_helper, m_phase2Ops, seenPhase1Ops));
        }
コード例 #34
0
ファイル: Form1.cs プロジェクト: paulduran/mediamanager
        private void DoSearch(IAppHelper helper)
        {
            statusLabel.Text = "Performing Search. Please Wait...";
            this.Cursor = Cursors.WaitCursor;
            // use an app helper to locate information
            //helper = appHelperFactory.GetAppHelper(appHelper);
            AppHelperContext context = new SimpleAppHelperContext();
            context["title"] = txtMovieName.Text;
            AppHelperItem[] items = helper.LocateItems(context);

            statusLabel.Text = null;
            this.Cursor = Cursors.Default;

            switch (items.Length)
            {
                case 0:
                    MessageBox.Show("No Match Found for: " + txtMovieName.Text);
                    break;
                case 1:
                    AppHelperItemSelected(helper, items[0]);
                    break;
                default:
                    AppHelperResultSelector resultSelector = new AppHelperResultSelector(helper);
                    resultSelector.ItemSelectedEvent += new AppHelperItemSelected(AppHelperItemSelected);
                    resultSelector.Items = items;
                    resultSelector.Show();
                    break;
            }
        }
コード例 #35
0
ファイル: AppChatBox.cs プロジェクト: tmbx/kwm
 public AppChatBox(IAppHelper appHelper)
     : base(appHelper)
 {
     m_chatWindowsContent[0] = "";
 }
コード例 #36
0
ファイル: AppPublicBridge.cs プロジェクト: tmbx/kwm-release
 public PublicChatGer(AppPublicBridge app, UInt64 reqID, UInt32 userID,
     UInt32 timeout, String userName, String subject)
 {
     m_app = app;
     m_helper = app.Helper;
     m_reqID = reqID;
     m_userID = userID;
     m_timeout = timeout;
     m_userName = userName;
     m_subject = subject;
 }
コード例 #37
0
ファイル: NotificationItem.cs プロジェクト: tmbx/kwm
 public NotificationItem(AnpMsg _msg, UInt32 appID, IAppHelper _helper)
 {
     m_helper = _helper;
     m_appID = appID;
     m_notificationToTake = DefaultEffect;
     if (_msg != null) Init(_msg);
 }
コード例 #38
0
ファイル: KwsApp.cs プロジェクト: tmbx/kwm-release
 /// <summary>
 /// Initialization code common to both the deserialized and
 /// non-deserialized cases. This method must be called explicitly
 /// when the workspace is deserialized.
 /// </summary>
 public virtual void Initialize(IAppHelper appHelper)
 {
     Helper = appHelper;
     Helper.OnKwsStatusChanged += OnKwsStatusChangedInternal;
     AppStatus = KwsAppStatus.Stopped;
     DirtyFlag = false;
 }
コード例 #39
0
ファイル: Tunnel.cs プロジェクト: fdgonthier/TbxLib
 public KwmTunnelThread(IAppHelper helper, String host, int port)
 {
     Helper = helper;
     Host   = host;
     Port   = port;
 }