Beispiel #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="SonarrClient"/> class.
        /// </summary>
        /// <param name="host">The host.</param>
        /// <param name="port">The port.</param>
        /// <param name="apiKey">The API key.</param>
        /// <param name="urlBase">The URL base.</param>
        /// <param name="useSsl">if set to <c>true</c> [use SSL].</param>
        public SonarrClient(string host, int port, string apiKey, [Optional] string urlBase, [Optional] bool useSsl)
        {
            // Initialize properties
            Host    = host;
            Port    = port;
            ApiKey  = apiKey;
            UrlBase = urlBase;
            UseSsl  = useSsl;

            // Set API URL
            ApiUrl = $"http{(UseSsl ? "s" : "")}://{Host}:{Port}{("/" + UrlBase ?? "")}/api";

            // Initialize endpoints
            Calendar          = new Calendar(this);
            Command           = new Command(this);
            Diskspace         = new Diskspace(this);
            Episode           = new Episode(this);
            EpisodeFile       = new EpisodeFile(this);
            History           = new History(this);
            Wanted            = new Wanted(this);
            Queue             = new Queue(this);
            Parse             = new Parse(this);
            Profile           = new Profile(this);
            Release           = new Release(this);
            ReleasePush       = new ReleasePush(this);
            Rootfolder        = new Rootfolder(this);
            Series            = new Series(this);
            SeriesLookup      = new SeriesLookup(this);
            SystemStatus      = new SystemStatus(this);
            SystemBackup      = new SystemBackup(this);
            Log               = new Log(this);
            QualityDefinition = new QualityDefinition(this);
        }
Beispiel #2
0
        private void Productionvoucher_Load(object sender, EventArgs e)
        {
            Models.AccountLookup acc = new Models.AccountLookup();


            // Create an in-place LookupEdit control.
            RepositoryItemLookUpEdit riLookup = new RepositoryItemLookUpEdit();

            acc.InitData();

            riLookup.DataSource    = acc.Categories;
            riLookup.ValueMember   = "ID";
            riLookup.DisplayMember = "CategoryName";

            // Enable the "best-fit" functionality mode in which columns have proportional widths and the popup window is resized to fit all the columns.
            riLookup.BestFitMode = DevExpress.XtraEditors.Controls.BestFitMode.BestFitResizePopup;
            // Specify the dropdown height.
            riLookup.DropDownRows = acc.Categories.Count;

            // Enable the automatic completion feature. In this mode, when the dropdown is closed,
            // the text in the edit box is automatically completed if it matches a DisplayMember field value of one of dropdown rows.
            riLookup.SearchMode = DevExpress.XtraEditors.Controls.SearchMode.AutoComplete;
            // Specify the column against which an incremental search is performed in SearchMode.AutoComplete and SearchMode.OnlyInPopup modes
            riLookup.AutoSearchColumnIndex = 1;

            // Optionally hide the Description column in the dropdown.
            // riLookup.PopulateColumns();
            // riLookup.Columns["Description"].Visible = false;

            // Assign the in-place LookupEdit control to the grid's CategoryID column.
            //// Note that the data types of the "ID" and "CategoryID" fields match.
            gdvItemIG.Columns["Item"].ColumnEdit = riLookup;
            gdvItemIG.BestFitColumns();

            gdvItemIC.Columns["Item"].ColumnEdit = riLookup;
            gdvItemIC.BestFitColumns();

            //Bill Sundry Lookup Edit
            //gridBs.Columns["BillSundry"].ColumnEdit = riLookup;
            //gridBs.BestFitColumns();

            //Series Lookup Edit
            SeriesLookup objSeries = new SeriesLookup();

            tbxSeries.Properties.DataSource = objSeries.Series;

            //Productin matecenter Lookup Edit
            tbxMatcenterIC.Properties.DataSource = objSeries.Series;
            tbxMatcenterIG.Properties.DataSource = objSeries.Series;

            //Party Lookup Edit
            //tbxParty.Properties.DataSource = acc.Categories;
            //tbxParty.Properties.DisplayMember = "CategoryName";
            //tbxParty.Properties.ValueMember = "CategoryName";

            ////Mat Centre Lookup Edit
            //tbxMatCentre.Properties.DataSource = acc.Categories;
            //tbxMatCentre.Properties.DisplayMember = "CategoryName";
            //tbxMatCentre.Properties.ValueMember = "CategoryName";
        }