Ideally you should be able to select the cells and use Merge option on right click. However it does not appear if you have a cell over a group or
if the cells you are selecting have a merged cell below them. For the second case , you will have to start from the row that has no merged cells on teh table. you shopuld be able to find "Merge" option on right click if you choose cells immediately above this row.
If there is a cel over group header, then it cannot be merged but you can merge other cells in that row for header.
I have a few OPC Servers I have created with Software Toolboxes SLIKDA. right now I have them running as windows forms which the users can interact with as they are simulations and or one off. I have been asked to make them into windows services and cannot figure out how to do this without rewriting the whole app and even with that I am not sure how I would get a form to run within a windows service.. I am a novice.. if someone can point me to some tutorials that would help it would be appreciated
You should not even try to run a form in a Windows Service! A service is designed to run in the background. If you need an UI to control the functionality of the service create a seperate application and implement some form of Interprocess Communication (WCF jumps to mind here , or just a small TCP stack, etc. I guess you get the idea).
A Windows Service will usually also run under a seperate User especially created for Services. If something like a form (or worse: a MessageBox) pops up this can have some very nasty side effects like blocking the service from continuing it's work etc.
If your application has a good separtion from UI code and business code, converting the Application should probably be a more or less trivial task. (Just move the code for the business logic to the Windows Service). If all you code is in the Forms Codebehind and intertwined with the UI Logic you'll have no choice but rewriting the whole thing.
i create control and this control derived from gridview control.then i add 2 column in constructor like this :
this.AutoGenerateColumns = false;
DataGridViewCheckBoxColumn cb = new DataGridViewCheckBoxColumn();
cb.HeaderText = "";
cb.Name = "dgvcSelect";
DataGridViewTextBoxColumn tb = new DataGridViewTextBoxColumn();
tb.Name = "dgvcRowNumber";
tb.HeaderText = "ردیف";
but when i run my program 4 column generate for me.where is the problem?
please help me
Your question does not make sense. FPS conversion actually means you are going to work with the video itself. If you mean subtitle converter and not a FPS converter, it would be best if you first have a basic understanding of the different subtitle formats.
A SRT file is just a text file so you can open and be able to modify it the same way you would open a .txt file. See below for an example. Subtitle Synchronization with C#[^]
Signature construction in progress. Sorry for the inconvenience.
subtitle converter, yes.
So, the conversion idea is to Add or Extract seconds and/or milliseconds from existing time. Hmmm.
//and offset can be: +1.1(add), -2.75(extract); example values.
But if I need to change from a predefined input FPS 23.978 to output FPS 23.976,
then the difference is -0.002 ?
or from 30 into 24, the difference is -06.000 ?
. I did not made something like this ever, its my first time, so I appreciate a straight answer, please. And I know it sound stupid, but I want to be sure before start anything, because can rapidly become a time consuming process. And also, it will be good for others too. Thanks walterhevedeich! Excellent example.
I still don't get your question. What exactly are you having problems with? Is it on retrieving the date time stamps from the file? Or on the subtracting part? By the way, once you've put the date time stamps on a collection class(a List, for example), I'm sure you won't have a problem on the subtraction/addition part because you already have some code for it.
Signature construction in progress. Sorry for the inconvenience.
Adding the same offset to all entries does not change the speed of the subtitles, it just shifts them in time.
To change the speed, add a different offset depending on the number of nanoseconds (or some other unit) from the start, or stated differently, multiply the time by something.
For example, to convert 23.978 FPS to 23.976, multiply each time by 23.978 / 23.976, or perhaps slightly more accurately (due to rounding), multiply the time by 23.978, then divide it by 23.976. You can factor out the fact that those are not integers by multiplying by 23978 (make sure there is no overflow) and then dividing by 23976, but if you use integer division, the division always rounds downwards and you get no chance to round To Nearest (so you'd get when using doubles and then rounding).
If you're now thinking "what does multiplying a time even mean", it means taking the number of nanoseconds (or some other unit) that the time represents (it's just an offset from the beginning of course), do the math on that number, and convert it back to a time-thing again (with rounded as necessary).
Extraordinary explanation Harold ! Well done.
But if I have to set that time, not knowing the initial time (i will test some predefined values) but if i am not so lucky in finding that value, how I can proceed?
ex of testing pseudocode :
inputTime=? outputTime=23.976 (i check movie properties);
if inputTime = 30, outputting to 23.976 will have the desired effect?
then, if inputTime = 25, outputting to 23.976 will have the desired effect?
then, if inputTime = 23, ...etc
This i will do manually from a list of defaults (30,25,23,etc) -Or writing it myself in a textbox whatever value i feel is right - but orbiting the default values.
My question is:
if I will have 0 for inputTime, How I will do the math then?
Your solution is: t=t*outputTime/inputTime;
if inputTime >0, t will have some specific duration.
if inputTime = 0 (I don't know what encoding can have that subtitle), t =0 and all my sub time will be 0. Subtitle file ruined.
I must make my program to guess the subtitle encoding (Its FPS encoded time) ?
Or go on manually set the inputTime? (from list of defaults and/or textbox with custom values)
I don't know, I can't think of anything except a manual test that probably doesn't even work well:
See what at time the last line from the subs appears (in the sub file), and compare that with the time in the movie that the last line in the subs should appear. Then, assuming the beginning isn't shifted, you could get an approximate ratio with videotime/subtime, or the approximate old FPS with newfps*videotime/subtime.